socket: fix disconnected message for pending logouts
the check was not quite correct. iscsi->pending_reconnect can be true but we are still connected (and thus can disconnect). This is the case when we receive an async logout request. Signed-off-by: Peter Lieven <pl@kamp.de>
This commit is contained in:
@@ -377,7 +377,8 @@ iscsi_disconnect(struct iscsi_context *iscsi)
|
||||
|
||||
close(iscsi->fd);
|
||||
|
||||
if (!iscsi->pending_reconnect && iscsi->connected_portal[0]) {
|
||||
if (!(iscsi->pending_reconnect && iscsi->old_iscsi) &&
|
||||
iscsi->connected_portal[0]) {
|
||||
ISCSI_LOG(iscsi, 2, "disconnected from portal %s",iscsi->connected_portal);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user