summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/inspsocket.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index d98fa1b61..37335c855 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -361,6 +361,11 @@ void StreamSocket::DoWrite()
else if (rv > 0)
{
// Partial write. Clean out strings from the sendq
+ if (rv < rv_max)
+ {
+ // it's going to block now
+ eventChange = FD_WANT_FAST_WRITE | FD_WRITE_WILL_BLOCK;
+ }
sendq_len -= rv;
while (rv > 0 && !sendq.empty())
{
@@ -378,11 +383,6 @@ void StreamSocket::DoWrite()
rv = 0;
}
}
- if (rv < rv_max)
- {
- // it's going to block now
- eventChange = FD_WANT_FAST_WRITE | FD_WRITE_WILL_BLOCK;
- }
}
else if (rv == 0)
{