Closed ghost closed 2 years ago
Hi! I wasn't able to reproduce with this basic example:
public class MyApplication {
public static void main(String[] args) throws URISyntaxException {
IO.Options options = IO.Options.builder()
.build();
Socket socket = IO.socket("http://localhost:8080", options);
socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() {
@Override
public void call(Object... args) {
System.out.println("connect");
}
});
socket.on("test", new Emitter.Listener() {
@Override
public void call(Object... args) {
System.out.println("got test"); // printed just once
socket.off("test");
}
});
socket.open();
}
}
Closed due to inactivity, please reopen if needed.
Describe the bug
The listener cannot be removed by calling the
off('EVENT')
methodTo Reproduce
Socket.IO server version:
4.4.0
Server
Socket.IO java client version:
x.y.z
Client
Expected behavior
Print "test" once when I send "put in tray"