summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/listensocket.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/listensocket.cpp b/src/listensocket.cpp
index 3a4473697..07ae491e0 100644
--- a/src/listensocket.cpp
+++ b/src/listensocket.cpp
@@ -75,7 +75,8 @@ ListenSocket::~ListenSocket()
{
ServerInstance->SE->DelFd(this);
ServerInstance->Logs->Log("SOCKET", DEBUG,"Shut down listener on fd %d", this->fd);
- if (ServerInstance->SE->Shutdown(this, 2) || ServerInstance->SE->Close(this))
+ ServerInstance->SE->Shutdown(this, 2);
+ if (ServerInstance->SE->Close(this) != 0)
ServerInstance->Logs->Log("SOCKET", DEBUG,"Failed to cancel listener: %s", strerror(errno));
this->fd = -1;
}