In server file present at chat-app , when a socket emits the disconnect event,a socket object is not being passed to the disconnection logic function which results in termination of all the sockets present in TCP network server.
Solution could be to pass a socket object to disconnect emition so that error can be handled instead of terminating session for all the users.
In server file present at chat-app , when a socket emits the disconnect event,a socket object is not being passed to the disconnection logic function which results in termination of all the sockets present in TCP network server.
Solution could be to pass a socket object to disconnect emition so that error can be handled instead of terminating session for all the users.