summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-16 13:11:21 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-16 13:11:21 +0200
commit45ec564b05a80a84ea55ad49989bbcc211e7ee87 (patch)
treeb517bbcd5298b7f5871c57335a442bf19b924c84 /src
parentdbc6dc90283220c06b4f4946cf0a131d2f965884 (diff)
Close listening sockets regardless of the return value of shutdown()
Diffstat (limited to 'src')
-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;
}