Make sure setHandshakeComplete() is called before the handler is replaced. See #332
This commit is contained in:
parent
288ed13b6b
commit
17cdc98499
@ -240,11 +240,11 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker {
|
||||
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
|
||||
setActualSubprotocol(subprotocol);
|
||||
|
||||
setHandshakeComplete();
|
||||
|
||||
channel.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder",
|
||||
new WebSocket00FrameDecoder(getMaxFramePayloadLength()));
|
||||
|
||||
setHandshakeComplete();
|
||||
|
||||
}
|
||||
|
||||
|
@ -229,10 +229,11 @@ public class WebSocketClientHandshaker08 extends WebSocketClientHandshaker {
|
||||
setActualSubprotocol(subprotocol);
|
||||
|
||||
|
||||
setHandshakeComplete();
|
||||
|
||||
channel.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder",
|
||||
new WebSocket08FrameDecoder(false, allowExtensions, this.getMaxFramePayloadLength()));
|
||||
|
||||
setHandshakeComplete();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -224,11 +224,11 @@ public class WebSocketClientHandshaker13 extends WebSocketClientHandshaker {
|
||||
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
|
||||
setActualSubprotocol(subprotocol);
|
||||
|
||||
|
||||
setHandshakeComplete();
|
||||
|
||||
channel.getPipeline().get(HttpResponseDecoder.class).replace("ws-decoder",
|
||||
new WebSocket13FrameDecoder(false, allowExtensions, this.getMaxFramePayloadLength()));
|
||||
|
||||
setHandshakeComplete();
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user