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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I78046ae5ad7992ad6c7509884f964d2eff6ced76 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470704 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
8703949c05
commit
7814351539
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user