JavaPhoenixChannels
JavaPhoenixChannels copied to clipboard
Websocket hangs after channel join
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.