diff options
Diffstat (limited to 'src/socket.cpp')
-rw-r--r-- | src/socket.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/socket.cpp b/src/socket.cpp index 508d638cf..23d760002 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -287,6 +287,9 @@ bool InspSocket::FlushWriteBuffer() bool InspSocket::Timeout(time_t current) { + if (!socket_ref[this->fd] || !ServerInstance->SE->HasFd(this->fd)) + return false; + if (((this->state == I_RESOLVING) || (this->state == I_CONNECTING)) && (current > timeout_end)) { log(DEBUG,"Timed out, current=%lu timeout_end=%lu"); @@ -305,6 +308,9 @@ bool InspSocket::Timeout(time_t current) bool InspSocket::Poll() { + if (!socket_ref[this->fd] || !ServerInstance->SE->HasFd(this->fd)) + return true; + int incoming = -1; bool n = true; |