diff options
Diffstat (limited to 'src/inspsocket.cpp')
-rw-r--r-- | src/inspsocket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index f29366c73..ecf7e0b24 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -356,9 +356,9 @@ void InspSocket::Close() Instance->Log(DEFAULT,"%s threw an exception: %s", modexcept.GetSource(), modexcept.GetReason()); } } - this->OnClose(); shutdown(this->fd,2); - close(this->fd); + if (close(this->fd) != -1) + this->OnClose(); if (Instance->SocketCull.find(this) == Instance->SocketCull.end()) Instance->SocketCull[this] = this; |