summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/m_spanningtree/uid.cpp1
-rw-r--r--src/socketengines/socketengine_epoll.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index 7059d9603..118bdc500 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -76,6 +76,7 @@ CmdResult CommandUID::Handle(const parameterlist &params, User* serversrc)
}
catch (...)
{
+ ServerInstance->Logs->Log("m_spanningtree", DEFAULT, "Duplicate UUID %s in client introduction", params[0].c_str());
return CMD_INVALID;
}
(*(ServerInstance->Users->clientlist))[params[2]] = _new;
diff --git a/src/socketengines/socketengine_epoll.cpp b/src/socketengines/socketengine_epoll.cpp
index 934106e54..4176c3b3a 100644
--- a/src/socketengines/socketengine_epoll.cpp
+++ b/src/socketengines/socketengine_epoll.cpp
@@ -233,6 +233,9 @@ int EPollEngine::DispatchEvents()
{
ReadEvents++;
eh->HandleEvent(EVENT_READ);
+ if (eh != ref[events[j].data.fd])
+ // whoa! we got deleted, better not give out the write event
+ continue;
}
if (events[j].events & EPOLLOUT)
{