summaryrefslogtreecommitdiff
path: root/src/inspsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r--src/inspsocket.cpp3
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)