diff --git a/lib/iscsi/conn.c b/lib/iscsi/conn.c index 948bd052c..08af1f36a 100644 --- a/lib/iscsi/conn.c +++ b/lib/iscsi/conn.c @@ -763,9 +763,10 @@ spdk_iscsi_conn_check_shutdown(void *arg) struct spdk_event *event; if (spdk_iscsi_get_active_conns() == 0) { + spdk_poller_unregister(&g_shutdown_timer, NULL); event = spdk_event_allocate(spdk_env_get_current_core(), spdk_iscsi_conn_check_shutdown_cb, NULL, NULL); - spdk_poller_unregister(&g_shutdown_timer, event); + spdk_event_call(event); } } @@ -830,8 +831,9 @@ spdk_iscsi_conn_stop_poller(struct spdk_iscsi_conn *conn, spdk_event_fn fn_after } __sync_fetch_and_sub(&g_num_connections[spdk_env_get_current_core()], 1); spdk_net_framework_clear_socket_association(conn->sock); + spdk_poller_unregister(&conn->poller, NULL); event = spdk_event_allocate(lcore, fn_after_stop, conn, NULL); - spdk_poller_unregister(&conn->poller, event); + spdk_event_call(event); } void spdk_shutdown_iscsi_conns(void) @@ -1448,7 +1450,8 @@ spdk_iscsi_conn_login_do_work(void *arg) __sync_fetch_and_sub(&g_num_connections[spdk_env_get_current_core()], 1); __sync_fetch_and_add(&g_num_connections[lcore], 1); spdk_net_framework_clear_socket_association(conn->sock); - spdk_poller_unregister(&conn->poller, event); + spdk_poller_unregister(&conn->poller, NULL); + spdk_event_call(event); } }