public void Disconnect() { mSocket.Disconnect(); Thread.Sleep(1000); mSocket.Clear(); mSocket.CloseSocket(); //if (listenerThread.IsAlive) //{ // listenerThread.Abort(); //} // Thread.CurrentThread.Abort(); }