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, 1 insertions, 1 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index e1f0d2c23..767e2c468 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -189,8 +189,8 @@ bool InspSocket::DoConnect()
{
log(DEBUG,"Error connect() %d: %s",this->fd,strerror(errno));
this->OnError(I_ERR_CONNECT);
- this->state = I_ERROR;
this->Close();
+ this->state = I_ERROR;
this->fd = -1;
this->ClosePending = true;
return false;