yapople
                                
                                
                                
                                    yapople copied to clipboard
                            
                            
                            
                        EventEmitter leak
There seems to be an EventEmitter leak in the client code.  If an error is thrown when logging in for example, things don't get cleaned up correctly.
I could be wrong but I don't see any calls to removeListener that balance the on calls that are made so this is probably the problem.
There is also a problem where the socket can be left open in the event of a bad login.  Steps to reproduce: call connect() with bad credentials, then you will be left in a state where the runloop fails to exit (the only way to fix it is to close the socket on the client manually - client._socket.close())