protected override void OnFail(bool abortive) { // Close the socket if this is an abortive failure (CancelConnectAsync) // or if we created it internally if (abortive || !_userSocket) { _socket.Dispose(); } }