summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index d28122b73..6ea91a83f 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -285,11 +285,11 @@ bool InspSocket::FlushWriteBuffer()
log(DEBUG,"Write error on socket: %s",strerror(errno));
this->OnError(I_ERR_WRITE);
this->state = I_ERROR;
- return false;
+ return true;
}
}
}
- return true;
+ return false;
}
bool InspSocket::Timeout(time_t current)
@@ -345,7 +345,7 @@ bool InspSocket::Poll()
* Both FlushWriteBuffer AND the return result of OnDataReady must
* return true for this to be ok.
*/
- return (n && this->FlushWriteBuffer());
+ return (n && !this->FlushWriteBuffer());
break;
default:
break;