From 4f6589e123c0a494287f59e3bc75e34ed6e4f6d7 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 21 Sep 2009 17:16:28 +0000 Subject: Don't try to write to dead users, add debug to SquitServer, and remove a string copy in spanningtree write git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11753 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/inspsocket.cpp') diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 964582062..1f0aa5629 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -296,6 +296,12 @@ void StreamSocket::DoWrite() void StreamSocket::WriteData(const std::string &data) { + if (fd < 0) + { + ServerInstance->Logs->Log("SOCKET", DEBUG, "Attempt to write data to dead socket: %s", + data.c_str()); + return; + } bool newWrite = sendq.empty() && !data.empty(); /* Append the data to the back of the queue ready for writing */ -- cgit v1.2.3