summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index df018bb47..1b2683257 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -303,6 +303,7 @@ bool InspSocket::FlushWriteBuffer()
log(DEBUG,"Write error on socket: %s",strerror(errno));
this->OnError(I_ERR_WRITE);
this->state = I_ERROR;
+ this->ClosePending = true;
return true;
}
}
@@ -335,6 +336,7 @@ bool InspSocket::Timeout(time_t current)
this->OnError(I_ERR_TIMEOUT);
timeout = true;
this->state = I_ERROR;
+ this->ClosePending = true;
return true;
}
return this->FlushWriteBuffer();