hi @halton , just a question:
Is it possible that the user ONLY needs to listen to 'onConnect' event, instead of BOTH 'onConnect' and 'onDisconnect' event?
The modified code seems to mix up 2 listeners. For example, when only 'onConnect' listener is set up, we will get the 'onDisconnect' msg too.