@@ -142,48 +142,24 @@ public void init(WebConnection connection) {
142142 wsSession = new WsSession (ep , wsRemoteEndpointServer , webSocketContainer , handshakeRequest .getRequestURI (), handshakeRequest .getParameterMap (), handshakeRequest .getQueryString (), handshakeRequest .getUserPrincipal (), httpSessionId , negotiatedExtensions , subProtocol , pathParameters , secure , endpointConfig );
143143 // newest ctor
144144 //wsSession = new WsSession(wsRemoteEndpointServer, webSocketContainer, handshakeRequest.getRequestURI(), handshakeRequest.getParameterMap(), handshakeRequest.getQueryString(), handshakeRequest.getUserPrincipal(), httpSessionId, negotiatedExtensions, subProtocol, pathParameters, secure, endpointConfig);
145- if (isTrace ) {
146- log .trace ("New connection 2 {}" , wsSession );
147- }
148145 wsFrame = new WsFrameServer (socketWrapper , upgradeInfo , wsSession , transformation , applicationClassLoader );
149- if (isTrace ) {
150- log .trace ("New connection 3 {}" , wsFrame );
151- }
152146 // WsFrame adds the necessary final transformations. Copy the completed transformation chain to the remote end point.
153147 wsRemoteEndpointServer .setTransformation (wsFrame .getTransformation ());
154- if (isTrace ) {
155- log .trace ("New connection 4" );
156- }
157148 // get the ws scope manager from user props
158149 WebSocketScopeManager manager = (WebSocketScopeManager ) endpointConfig .getUserProperties ().get (WSConstants .WS_MANAGER );
159- if (isTrace ) {
160- log .trace ("New connection 5" );
161- }
162150 // get ws scope from user props
163151 WebSocketScope scope = (WebSocketScope ) endpointConfig .getUserProperties ().get (WSConstants .WS_SCOPE );
164- if (isTrace ) {
165- log .trace ("New connection 6 - Scope: {} WS session: {}" , scope , wsSession );
166- }
167152 // create a ws connection instance
168153 WebSocketConnection conn = new WebSocketConnection (scope , wsSession );
169- // in debug check since WebSocketConnection.toString is a tiny bit expensive
170- if (isTrace ) {
171- log .trace ("New connection 7: {}" , conn );
172- }
173154 // set ip and port
174155 conn .setAttribute (WSConstants .WS_HEADER_REMOTE_IP , socketWrapper .getRemoteAddr ());
175156 conn .setAttribute (WSConstants .WS_HEADER_REMOTE_PORT , socketWrapper .getRemotePort ());
176157 // add the request headers
177158 conn .setHeaders (handshakeRequest .getHeaders ());
178- if (isTrace ) {
179- log .trace ("New connection 8: {}" , conn );
180- }
181159 // add the connection to the user props
182160 endpointConfig .getUserProperties ().put (WSConstants .WS_CONNECTION , conn );
183161 // must be added to the session as well since the session ctor copies from the endpoint and doesnt update
184162 wsSession .getUserProperties ().put (WSConstants .WS_CONNECTION , conn );
185- // set the upgrade handler so it can be destroyed when ws conn is closed
186- wsSession .getUserProperties ().put (WSConstants .WS_UPGRADE_HANDLER , this );
187163 // set connected flag
188164 conn .setConnected ();
189165 // fire endpoint handler
0 commit comments