diff options
-rw-r--r-- | src/socket.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index 06e01f54c..498b17949 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -257,7 +257,9 @@ int InspSocket::Write(const std::string &data) if (this->ClosePending) return false; - write(this->fd,data.c_str(),data.length()); + int result = write(this->fd,data.c_str(),data.length()); + if (result < 1) + return false; return true; /* Try and append the data to the back of the queue, and send it on its way |