summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp5
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp5
2 files changed, 4 insertions, 6 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index fb50c0f09..9d9e08d4c 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -293,11 +293,12 @@ class ModuleSSLGnuTLS : public Module
{
User* user = (User*)item;
- if(user->io)
+ if (user->io == this)
{
// User is using SSL, they're a local user, and they're using one of *our* SSL ports.
// Potentially there could be multiple SSL modules loaded at once on different ports.
ServerInstance->Users->QuitUser(user, "SSL module unloading");
+ user->io = NULL;
}
if (user->GetExt("ssl_cert", dummy))
{
@@ -306,8 +307,6 @@ class ModuleSSLGnuTLS : public Module
delete tofree;
user->Shrink("ssl_cert");
}
-
- user->io = NULL;
}
}
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 4368c8d47..83ae36e73 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -318,11 +318,12 @@ class ModuleSSLOpenSSL : public Module
{
User* user = (User*)item;
- if (user->GetExt("ssl", dummy) && IS_LOCAL(user) && user->io == this)
+ if (user->io == this)
{
// User is using SSL, they're a local user, and they're using one of *our* SSL ports.
// Potentially there could be multiple SSL modules loaded at once on different ports.
ServerInstance->Users->QuitUser(user, "SSL module unloading");
+ user->io = NULL;
}
if (user->GetExt("ssl_cert", dummy))
{
@@ -331,8 +332,6 @@ class ModuleSSLOpenSSL : public Module
delete tofree;
user->Shrink("ssl_cert");
}
-
- user->io = NULL;
}
}