[#864] Switch to single decoding mode on the protocol upgrade to prevent races
This commit is contained in:
parent
f2d84f75d6
commit
e8636050ca
@ -173,6 +173,8 @@ public class WebSocketClientHandshaker00 extends WebSocketClientHandshaker {
|
||||
headers.set(Names.CONTENT_LENGTH, key3.length);
|
||||
request.data().writeBytes(key3);
|
||||
|
||||
channel.pipeline().get(HttpResponseDecoder.class).setSingleDecode(true);
|
||||
|
||||
ChannelFuture future = channel.write(request);
|
||||
future.addListener(new ChannelFutureListener() {
|
||||
@Override
|
||||
|
@ -152,6 +152,8 @@ public class WebSocketClientHandshaker07 extends WebSocketClientHandshaker {
|
||||
headers.add(customHeaders);
|
||||
}
|
||||
|
||||
channel.pipeline().get(HttpResponseDecoder.class).setSingleDecode(true);
|
||||
|
||||
ChannelFuture future = channel.write(request);
|
||||
future.addListener(new ChannelFutureListener() {
|
||||
@Override
|
||||
|
@ -152,6 +152,8 @@ public class WebSocketClientHandshaker08 extends WebSocketClientHandshaker {
|
||||
headers.add(customHeaders);
|
||||
}
|
||||
|
||||
channel.pipeline().get(HttpResponseDecoder.class).setSingleDecode(true);
|
||||
|
||||
ChannelFuture future = channel.write(request);
|
||||
future.addListener(new ChannelFutureListener() {
|
||||
@Override
|
||||
|
@ -152,6 +152,8 @@ public class WebSocketClientHandshaker13 extends WebSocketClientHandshaker {
|
||||
headers.add(customHeaders);
|
||||
}
|
||||
|
||||
channel.pipeline().get(HttpResponseDecoder.class).setSingleDecode(true);
|
||||
|
||||
ChannelFuture future = channel.write(request);
|
||||
future.addListener(new ChannelFutureListener() {
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user