internal void FinishConnectByNameSyncFailure(Exception exception, int bytesTransferred, SocketFlags flags) { SetResults(exception, bytesTransferred, flags); if (_currentSocket != null) { _currentSocket.UpdateStatusAfterSocketError(_socketError); } Complete(); }
private void SyncFail(Exception e) { OnFail(false); if (_internalArgs != null) { _internalArgs.Dispose(); } SocketException socketException = e as SocketException; if (socketException != null) { _userArgs.FinishConnectByNameSyncFailure(socketException, 0, SocketFlags.None); } else { ExceptionDispatchInfo.Throw(e); } }