summaryrefslogtreecommitdiff
path: root/src/common/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/socket.c')
-rw-r--r--src/common/socket.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/socket.c b/src/common/socket.c
index c8fe7aa1c..0bcc979da 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -646,6 +646,10 @@ int do_sendrecv(int next)
if(h_errno == EBADF) //See the #defines at the top
{
ShowError("Deleting invalid session %d\n", i);
+ //So the code can react accordingly
+ session[i]->eof = 1;
+ if(session[i]->func_parse)
+ session[i]->func_parse(i);
free_session_mem(i); //free the bad session
continue;
}