diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-07-28 14:21:20 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-07-28 14:21:20 +0200 |
commit | cd330c4bc5ae3e2e89a5c02a031ffd90292e94f1 (patch) | |
tree | 83ef3265d1675b5aa27fc92a653e94fc5c97d750 | |
parent | 3c810a7af5f568ae870c4439b5ea2a4d89fa7d01 (diff) |
m_spanningtree Ensure that TreeSocket::Close() only runs once
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 25cc751e4..7e26a325e 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -344,8 +344,10 @@ void TreeSocket::OnTimeout() void TreeSocket::Close() { - if (fd != -1) - ServerInstance->GlobalCulls.AddItem(this); + if (fd < 0) + return; + + ServerInstance->GlobalCulls.AddItem(this); this->BufferedSocket::Close(); SetError("Remote host closed connection"); |