public void destory() { client.closeSocket(); isConnected = false; okToPublish = false; while (thPub != null && thPub.IsAlive) { thPub.Abort(); Debug.Log("trying to stop thread"); } }
public void destory() { if (client != null) { client.closeSocket(); } if (sub != null) { sub.closeSocket(); } isConnected = false; }