From e30a2f19527514446af316cbb599c9fe8a96aacd Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 19 May 2008 22:10:46 +0000 Subject: Backport r9773, fixes bug #534 reported by irefuse. Listening sockets cannot have a close hook. git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@9774 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspsocket.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/inspsocket.cpp') diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index 2397f4444..904739375 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -360,7 +360,8 @@ void InspSocket::Close() { try { - Instance->Config->GetIOHook(this)->OnRawSocketClose(this->fd); + if (this->state != I_LISTENING) + Instance->Config->GetIOHook(this)->OnRawSocketClose(this->fd); } catch (CoreException& modexcept) { -- cgit v1.3.1-10-gc9f91