Open ramjak opened 5 years ago
Ohh that is interesting, i will check it out today.
@ramjak i have run tests locally and seems like everything works correctly
First is calling close socket from frontend (works ok)
<script>
let socket = new ClusterWS({
url: 'ws://localhost:3000'
});
socket.on("disconnect", (code, error) => {
console.log("Should be called", code, error);
});
setTimeout(() => {
console.log("Close socket");
socket.disconnect();
}, 5000)
</script>
and second i tied calling close from back end (also works ok)
<script>
let socket = new ClusterWS({
url: 'ws://localhost:3000'
});
socket.on("disconnect", (code, error) => {
console.log("Should be called", code, error);
});
</script>
Can you please provide your code which does not work.
Submitting
Using:
Desc: 'disconnect' event is not triggered after the socket is closed. After I check the disconnect event is missing in the event list in the EventEmitter.
I've tried to check if off in the EventEmitter is triggered, but it's not.