From 959e902e57403148e556200568ff3e58408201de Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 20 Aug 2007 18:02:50 +0000 Subject: The only possibility for the issue sts found is that a socket is deleted but also ends up in the socket cull list somehow. To ensure that the socket does not get deleted, remove the delete and replace with an explicit call to insert into the socket cull list. We were grappling with these issues in early 1.1 with the userrec cull list, too. NOTE for later 1.2's consider making CullList a base class which we can derive from to delete lists of other items than userrecs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7775 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/resolvers.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree') diff --git a/src/modules/m_spanningtree/resolvers.cpp b/src/modules/m_spanningtree/resolvers.cpp index ac14833a5..972b36366 100644 --- a/src/modules/m_spanningtree/resolvers.cpp +++ b/src/modules/m_spanningtree/resolvers.cpp @@ -69,7 +69,8 @@ void ServernameResolver::OnLookupComplete(const std::string &result, unsigned in { /* Something barfed, show the opers */ ServerInstance->SNO->WriteToSnoMask('l',"CONNECT: Error connecting \002%s\002: %s.",MyLink.Name.c_str(),strerror(errno)); - delete newsocket; + if (ServerInstance->SocketCull.find(newsocket) == ServerInstance->SocketCull.end()) + ServerInstance->SocketCull[newsocket] = newsocket; Utils->DoFailOver(&MyLink); } } -- cgit v1.2.3