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:
Peter Lieven
2015-04-20 14:26:11 +02:00
parent fe75c0f10c
commit 1f6d901324

View File

@@ -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);
}