Answer the question
In order to leave comments, you need to log in
How to disconnect connection in socket.io and then reconnect?
I am writing an application in AngularJS, it is necessary to disconnect the connection when the user logs out, and create a new one when the user logs in again.
I did it like this, when I exit I execute: socket.socket.disconnect();
And I clear the socket variable.
But when I log in, the connection is not established.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question