From d3b4b4622351114dbce128048b3156b468888e92 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 11 May 2012 01:20:26 +0000 Subject: [PATCH] Patch improving handling of errors during passing connection to the kernel. From Lev Vainblat git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4295 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/usr/iscsi_scstd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/iscsi-scst/usr/iscsi_scstd.c b/iscsi-scst/usr/iscsi_scstd.c index d9c568743..392d73277 100644 --- a/iscsi-scst/usr/iscsi_scstd.c +++ b/iscsi-scst/usr/iscsi_scstd.c @@ -416,7 +416,10 @@ again: switch (conn->state) { case STATE_KERNEL: conn_pass_to_kern(conn, pollfd->fd); - conn->state = STATE_CLOSE; + if(conn->passed_to_kern) + conn->state = STATE_CLOSE; + else + conn->state = STATE_EXIT; break; case STATE_EXIT: case STATE_CLOSE: