summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/inspsocket.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 95d119800..2fb811508 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -363,7 +363,8 @@ void BufferedSocket::Close()
{
try
{
- Instance->Config->GetIOHook(this)->OnRawSocketClose(this->fd);
+ if (this->state != I_LISTENING)
+ Instance->Config->GetIOHook(this)->OnRawSocketClose(this->fd);
}
catch (CoreException& modexcept)
{