summaryrefslogtreecommitdiff
path: root/src/socket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socket.cpp')
-rw-r--r--src/socket.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/socket.cpp b/src/socket.cpp
index 67931e49b..7a746ba0f 100644
--- a/src/socket.cpp
+++ b/src/socket.cpp
@@ -55,8 +55,10 @@ ListenSocket::~ListenSocket()
{
if (this->GetFd() > -1)
{
- shutdown(this->fd, 2);
- close(this->fd);
+ ServerInstance->SE->DelFd(this);
+ ServerInstance->Log(DEBUG,"Shut down listener on fd %d", this->fd);
+ if (shutdown(this->fd, 2) || close(this->fd))
+ ServerInstance->Log(DEBUG,"Failed to cancel listener: %s", strerror(errno));
this->fd = -1;
}
}
@@ -419,12 +421,14 @@ bool InspIRCd::BindSocket(int sockfd, int port, char* addr, bool dolisten)
}
else
{
+ this->Log(DEBUG,"New socket binding for %d with listen: %s:%d", sockfd, addr, port);
NonBlocking(sockfd);
return true;
}
}
else
{
+ this->Log(DEBUG,"New socket binding for %d without listen: %s:%d", sockfd, addr, port);
return true;
}
}