Fix a NoSuchElementException when WebSocketClientHandshaker is used with HttpRequestEncoder

This commit is contained in:
Norman Maurer 2013-03-11 13:54:03 +01:00
parent 2406a9f8b8
commit 978cf0d98a

View File

@ -212,12 +212,8 @@ public abstract class WebSocketClientHandshaker {
throw new IllegalStateException("ChannelPipeline does not contain " +
"a HttpRequestEncoder or HttpClientCodec");
}
p.replaceAndForward(ctx.name(), "ws-decoder", newWebsocketDecoder());
} else {
p.remove(HttpRequestEncoder.class);
p.replaceAndForward(ctx.name(),
"ws-decoder", newWebsocketDecoder());
}
p.replaceAndForward(ctx.name(), "ws-decoder", newWebsocketDecoder());
}
/**