From 45ec564b05a80a84ea55ad49989bbcc211e7ee87 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Tue, 16 Apr 2013 13:11:21 +0200 Subject: Close listening sockets regardless of the return value of shutdown() --- src/listensocket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.3