summaryrefslogtreecommitdiff
path: root/src/modules/extra/m_ssl_openssl.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-06-21 15:07:43 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-06-21 15:07:43 +0200
commit86c3fde2fedfe9270eeaa1a93c0ea15d6fb9962d (patch)
tree19753c425ff2752b0ccaa6a5c3f985f088f4c108 /src/modules/extra/m_ssl_openssl.cpp
parent925afed1b90871a52fb19f0ee2cb99cd26a53bae (diff)
m_ssl_gnutls, m_ssl_openssl After a read schedule another read if data remains in the buffer of the SSL library
Diffstat (limited to 'src/modules/extra/m_ssl_openssl.cpp')
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index b21091d3f..9e6472ac3 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -591,8 +591,15 @@ class ModuleSSLOpenSSL : public Module
if (ret > 0)
{
recvq.append(buffer, ret);
+
+ int mask = 0;
+ // Schedule a read if there is still data in the OpenSSL buffer
+ if (SSL_pending(session->sess) > 0)
+ mask |= FD_ADD_TRIAL_READ;
if (session->data_to_write)
- ServerInstance->SE->ChangeEventMask(user, FD_WANT_POLL_READ | FD_WANT_SINGLE_WRITE);
+ mask |= FD_WANT_POLL_READ | FD_WANT_SINGLE_WRITE;
+ if (mask != 0)
+ ServerInstance->SE->ChangeEventMask(user, mask);
return 1;
}
else if (ret == 0)