diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-07-21 17:07:32 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2021-07-21 17:07:32 +0700 |
commit | c1f2778cf47353e046741d11bd2b383f775b142d (patch) | |
tree | 8182991c62194664d6b1962f880ea5f5b7b34096 | |
parent | Further bzip2 perf. opts. (diff) | |
download | BouncyCastle.NET-ed25519-c1f2778cf47353e046741d11bd2b383f775b142d.tar.xz |
Simplify HandleClose
-rw-r--r-- | crypto/src/tls/TlsProtocol.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/crypto/src/tls/TlsProtocol.cs b/crypto/src/tls/TlsProtocol.cs index db30f6b40..317b6b193 100644 --- a/crypto/src/tls/TlsProtocol.cs +++ b/crypto/src/tls/TlsProtocol.cs @@ -259,18 +259,18 @@ namespace Org.BouncyCastle.Tls { this.m_closed = true; - if (user_canceled && !m_appDataReady) - { - RaiseAlertWarning(AlertDescription.user_canceled, "User canceled handshake"); - } - - RaiseAlertWarning(AlertDescription.close_notify, "Connection closed"); - if (!m_appDataReady) { CleanupHandshake(); + + if (user_canceled) + { + RaiseAlertWarning(AlertDescription.user_canceled, "User canceled handshake"); + } } + RaiseAlertWarning(AlertDescription.close_notify, "Connection closed"); + CloseConnection(); } } |