From 8af51fb7d539e19e43b924adb1d52e78c699ef10 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Mar 2006 20:04:24 +0000 Subject: Put some error checking back in here git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3684 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3