Hi,
Thanks for testing.
First, wanted to explain a little, IsConnect property is not always correct, since it will not handle situation where connection was dropped by the server in this case IsConnect still will be true until next network request, so in order to truly determine if socket is connected you need to for a little more.
Now, you actually made me thing of another possible reason for that. I am locking all socket related operation except this one and I think it might causing the problem.
Can you try this:
partialvoid IsSocketConnected(refbool isConnected) {lock (this._socketLock) { isConnected = (!this._isDisconnecting &&this._socket != null&&this._socket.Connected &&this._isAuthenticated &&this._messageListenerCompleted != null)&& !(this._socket.Poll(1, SelectMode.SelectRead) &&this._socket.Available == 0); } }
And let me know if you still experience the problem.
Thanks,
Oleg