private void Socket_Send(IAsyncResult ar) { try { lock (this) { var socket = _socket; socket?.EndSend(ar); } } catch (Exception e) { if (ExceptionRaised == null) Logger.Err(LogMask.Aegis, e.ToString()); else ExceptionRaised.Invoke(e); }; }