Call setHandshakeComplete() before the handler replacement (#332)
- Contributed by @normanmaurer
This commit is contained in:
parent
c32df371ab
commit
a494f201fc
@ -223,10 +223,10 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker {
|
|||||||
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
|
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
|
||||||
setActualSubprotocol(subprotocol);
|
setActualSubprotocol(subprotocol);
|
||||||
|
|
||||||
|
setHandshakeComplete();
|
||||||
|
|
||||||
channel.pipeline().get(HttpResponseDecoder.class).replace(
|
channel.pipeline().get(HttpResponseDecoder.class).replace(
|
||||||
"ws-decoder", new WebSocket00FrameDecoder(getMaxFramePayloadLength()));
|
"ws-decoder", new WebSocket00FrameDecoder(getMaxFramePayloadLength()));
|
||||||
|
|
||||||
setHandshakeComplete();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String insertRandomCharacters(String key) {
|
private static String insertRandomCharacters(String key) {
|
||||||
|
@ -200,10 +200,10 @@ public class WebSocketClientHandshaker08 extends WebSocketClientHandshaker {
|
|||||||
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
|
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
|
||||||
setActualSubprotocol(subprotocol);
|
setActualSubprotocol(subprotocol);
|
||||||
|
|
||||||
|
setHandshakeComplete();
|
||||||
|
|
||||||
channel.pipeline().get(HttpResponseDecoder.class).replace(
|
channel.pipeline().get(HttpResponseDecoder.class).replace(
|
||||||
"ws-decoder",
|
"ws-decoder",
|
||||||
new WebSocket08FrameDecoder(false, allowExtensions, getMaxFramePayloadLength()));
|
new WebSocket08FrameDecoder(false, allowExtensions, getMaxFramePayloadLength()));
|
||||||
|
|
||||||
setHandshakeComplete();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -200,10 +200,10 @@ public class WebSocketClientHandshaker13 extends WebSocketClientHandshaker {
|
|||||||
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
|
String subprotocol = response.getHeader(Names.SEC_WEBSOCKET_PROTOCOL);
|
||||||
setActualSubprotocol(subprotocol);
|
setActualSubprotocol(subprotocol);
|
||||||
|
|
||||||
|
setHandshakeComplete();
|
||||||
|
|
||||||
channel.pipeline().get(HttpResponseDecoder.class).replace(
|
channel.pipeline().get(HttpResponseDecoder.class).replace(
|
||||||
"ws-decoder",
|
"ws-decoder",
|
||||||
new WebSocket13FrameDecoder(false, allowExtensions, getMaxFramePayloadLength()));
|
new WebSocket13FrameDecoder(false, allowExtensions, getMaxFramePayloadLength()));
|
||||||
|
|
||||||
setHandshakeComplete();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user