It happens when you
1. Connect
2. Send some thing
3. Unplug the network cable
4. send again --> __wait forever__
The reason is: in step 4, it tries to call Disconnect(), which calls _messageListenerCompleted,WaitOne(). But _messageListenerCompleted.Set() is called in the same thread, and will never happen, thus the application is locked.
1. Connect
2. Send some thing
3. Unplug the network cable
4. send again --> __wait forever__
The reason is: in step 4, it tries to call Disconnect(), which calls _messageListenerCompleted,WaitOne(). But _messageListenerCompleted.Set() is called in the same thread, and will never happen, thus the application is locked.