diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-22 12:50:06 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-22 12:50:06 +0000 |
commit | 82ebe116132fb9b64005f8fafc8b5ed34ed8d8eb (patch) | |
tree | cbe367113d7f0e2f29a38d0d49949522a99ab01b /src/inspsocket.cpp | |
parent | 3136e030975ad14a7d883bfd1f7dcfd520932a91 (diff) |
Tweaks to drain socket on write
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5513 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r-- | src/inspsocket.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 4a37b1b04..2ddc3cf75 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -331,9 +331,10 @@ int InspSocket::Write(const std::string &data) bool InspSocket::FlushWriteBuffer() { + errno = 0; if ((this->fd > -1) && (this->state == I_CONNECTED)) { - if (outbuffer.size()) + while (outbuffer.size() && (errno != EAGAIN)) { int result = write(this->fd,outbuffer[0].c_str(),outbuffer[0].length()); if (result > 0) |