summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2016-08-24 12:27:51 +0200
committerAttila Molnar <attilamolnar@hush.com>2016-08-24 12:27:51 +0200
commitb200104cf2c61465acecaca111e3ec727fc3b954 (patch)
tree818f420f734ad68a6c819b18b34fc93db38d7643 /src/modules/m_spanningtree
parentfb7acf3bf7db27f61d9261a99862654dd3721a06 (diff)
Check for errors after calling IOHookProvider::OnAccept()
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index a96c4a90c..370c38d2c 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -63,8 +63,16 @@ TreeSocket::TreeSocket(int newfd, ListenSocket* via, irc::sockets::sockaddrs* cl
for (ListenSocket::IOHookProvList::iterator i = via->iohookprovs.begin(); i != via->iohookprovs.end(); ++i)
{
ListenSocket::IOHookProvRef& iohookprovref = *i;
- if (iohookprovref)
- iohookprovref->OnAccept(this, client, server);
+ if (!iohookprovref)
+ continue;
+
+ iohookprovref->OnAccept(this, client, server);
+ // IOHook could have encountered a fatal error, e.g. if the TLS ClientHello was already in the queue and there was no common TLS version
+ if (!getError().empty())
+ {
+ TreeSocket::OnError(I_ERR_OTHER);
+ return;
+ }
}
SendCapabilities(1);