diff options
| author | 2013-04-16 13:11:21 +0200 | |
|---|---|---|
| committer | 2013-04-16 13:11:21 +0200 | |
| commit | 45ec564b05a80a84ea55ad49989bbcc211e7ee87 (patch) | |
| tree | b517bbcd5298b7f5871c57335a442bf19b924c84 /src | |
| parent | Do not enable SO_LINGER on our sockets (diff) | |
| download | inspircd++-45ec564b05a80a84ea55ad49989bbcc211e7ee87.tar.gz inspircd++-45ec564b05a80a84ea55ad49989bbcc211e7ee87.tar.bz2 inspircd++-45ec564b05a80a84ea55ad49989bbcc211e7ee87.zip | |
Close listening sockets regardless of the return value of shutdown()
Diffstat (limited to 'src')
| -rw-r--r-- | src/listensocket.cpp | 3 |
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; } |
