Commit 78143515 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Changpeng Liu
Browse files

lib/iscsi: Consolidate call spdk_iscsi_conn_destruct() in a single place



Change logout_timeout() not to call spdk_iscsi_conn_construct() but
to move conn->state to EXITING. Then spdk_iscsi_conn_destruct() will
be called by the poller of iSCSI poll group, iscsi_poll_group_poll()
soon.

This will improve the maitainability slightly.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I78046ae5ad7992ad6c7509884f964d2eff6ced76
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470704


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 8703949c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1491,7 +1491,9 @@ logout_timeout(void *arg)
{
	struct spdk_iscsi_conn *conn = arg;

	spdk_iscsi_conn_destruct(conn);
	if (conn->state < ISCSI_CONN_STATE_EXITING) {
		conn->state = ISCSI_CONN_STATE_EXITING;
	}

	return -1;
}