JavaPhoenixChannels icon indicating copy to clipboard operation
JavaPhoenixChannels copied to clipboard

Websocket hangs after channel join

Open zastrixarundell opened this issue 6 years ago • 0 comments

I think that the title is self-explanatory. When I try to use the following:

URI uri = new URI("ws://localhost:4000/plugin/websocket");

Socket socket = new Socket(uri.toString());
socket.connect();

JsonNode node = JsonNodeFactory.instance.objectNode()
        .put("message", "hello!");

Channel channel = socket.chan("plugin:connect", node);
channel.join();


channel.push("new:msg", node);
channel.leave();
socket.disconnect();

I can connect and the payload does show, and then nothing. It doesn't push the message, doesn't leave nor disconnect and my Java app is never actually stopped.

zastrixarundell avatar Dec 07 '19 00:12 zastrixarundell