From f40ede375016051d9026710122a40a5bbdd93c9f Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 1 May 2007 19:41:27 +0000 Subject: Fix crashbug in latest svn introduced by inspsocket cull list, which can cause a crash if the connection times out and an error occurs on the socket before its deleted git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6855 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket1.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp index a05ed6e4c..21c6de118 100644 --- a/src/modules/m_spanningtree/treesocket1.cpp +++ b/src/modules/m_spanningtree/treesocket1.cpp @@ -216,6 +216,14 @@ void TreeSocket::OnError(InspSocketError e) if (MyLink) Utils->DoFailOver(MyLink); } + else + { + if ((errno) && (errno != EINPROGRESS) && (errno != EAGAIN)) + { + std::string errstr = strerror(errno); + this->Instance->SNO->WriteToSnoMask('l',"Connection to \002"+myhost+"\002 failed with error: " + errstr); + } + } } int TreeSocket::OnDisconnect() -- cgit v1.2.3