Open sokolas opened 8 years ago
@sokolas sorry haven't got time yet to dig more into this but the issue is with Ws7To13UpgradeHandler in which while removing HttpClientCodec
, the message buffered in the codec is emitted first before the HTTP headers.
I've encountered this as well. Looking at Netty's WebSocketClientHandshaker
by comparison it delays the removal of the HttpClientCodec
.
I have a piece of code very similar to the example EchoClient example
Here it is:
When connected, the client should receive a message from the server, like this:
{"t":null,"s":null,"op":10,"d":{"heartbeat_interval":41250,"_trace":["discord-gateway-prd-1-12"]}}
A working example can be found here: WebSocket example (jsfiddle) - run it and look in the browser console for its output. This is to ensure the server sends me data upon connecting.
What I get with my Java code, though, is a warning from netty:
What am I doing wrong here?