summaryrefslogtreecommitdiff
path: root/include/modules
diff options
context:
space:
mode:
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/ssl.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/modules/ssl.h b/include/modules/ssl.h
index 2227c4b13..ac2e367fd 100644
--- a/include/modules/ssl.h
+++ b/include/modules/ssl.h
@@ -186,9 +186,10 @@ class SSLIOHook : public IOHook
public:
static SSLIOHook* IsSSL(StreamSocket* sock)
{
- IOHook* const iohook = sock->GetIOHook();
- if ((iohook) && ((iohook->prov->type == IOHookProvider::IOH_SSL)))
- return static_cast<SSLIOHook*>(iohook);
+ IOHook* const lasthook = sock->GetLastHook();
+ if (lasthook && (lasthook->prov->type == IOHookProvider::IOH_SSL))
+ return static_cast<SSLIOHook*>(lasthook);
+
return NULL;
}