summaryrefslogtreecommitdiffstats
path: root/src/server/iscsi.c
diff options
context:
space:
mode:
authorSimon Rettberg2025-10-27 11:25:43 +0100
committerSimon Rettberg2025-12-09 15:33:20 +0100
commit4eb4d11658b7276184019856e13a6d6d4a2456d4 (patch)
tree0efe3e2860284f19c2ffd5ec8e3bcf22184e9179 /src/server/iscsi.c
parent[SERVER] iscsi: Restore proper padding of DataSegment (diff)
downloaddnbd3-4eb4d11658b7276184019856e13a6d6d4a2456d4.tar.gz
dnbd3-4eb4d11658b7276184019856e13a6d6d4a2456d4.tar.xz
dnbd3-4eb4d11658b7276184019856e13a6d6d4a2456d4.zip
[SERVER] iscsi: Honor global _shutdown
Diffstat (limited to 'src/server/iscsi.c')
-rw-r--r--src/server/iscsi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/iscsi.c b/src/server/iscsi.c
index c1fc01f..668b8a0 100644
--- a/src/server/iscsi.c
+++ b/src/server/iscsi.c
@@ -4211,7 +4211,7 @@ static int iscsi_connection_pdu_read(iscsi_connection *conn)
break;
}
}
- if ( conn->state == ISCSI_CONNECT_STATE_EXITING ) {
+ if ( conn->state == ISCSI_CONNECT_STATE_EXITING || _shutdown ) {
return ISCSI_CONNECT_PDU_READ_ERR_FATAL;
}
} while ( prev_recv_state != conn->pdu_recv_state );
@@ -4264,8 +4264,6 @@ void iscsi_connection_handle(dnbd3_client_t *client, const dnbd3_request_t *requ
conn->id = ++CONN_ID;
while ( iscsi_connection_pdu_read( conn ) >= ISCSI_CONNECT_PDU_READ_OK ) {
- if ( (conn->flags & ISCSI_CONNECT_FLAGS_STOPPED) != 0 )
- break;
}
iscsi_connection_destroy( conn );