diff options
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r-- | src/inspsocket.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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 */ |