summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 2939f4757..36ee530a2 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -490,6 +490,7 @@ class ModuleSSLGnuTLS : public Module
if(!Handshake(session, fd))
{
+ errno = session->status == ISSL_CLOSING ? EIO : EAGAIN;
// Couldn't resume handshake.
return -1;
}
@@ -561,7 +562,7 @@ class ModuleSSLGnuTLS : public Module
{
// The handshake isn't finished, try to finish it.
Handshake(session, fd);
- errno = EAGAIN;
+ errno = session->status == ISSL_CLOSING ? EIO : EAGAIN;
return -1;
}