/// On socket disconnecting void WorldSocket::OnDisconnect() { ///- Stop sending remaining data through this socket if (_session) { _session->SetSocket(NULL); // Session deleted from World session list at socket==0, //This is only back reference from socket to session. _session = NULL; } ///- Removes socket from player queue sWorld.RemoveQueuedPlayer(this); }