/// <summary> /// First time Close is called - will do a shutdown. /// The second time its called the socket will be closed. /// </summary> public override void Close() { if (!_shutdown) { _usock.Shutdown(); _shutdown = true; } else { _usock.Close(); } base.Close(); }