nvmf: destruct the session when no connections on it
Change-Id: I32a9d71ea139eec346f020c629260a395fd228b9 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
b1860be94a
commit
080bdfb1da
@ -701,6 +701,9 @@ spdk_nvmf_handle_disconnect(spdk_event_t event)
|
|||||||
struct spdk_nvmf_conn *conn = spdk_event_get_arg2(event);
|
struct spdk_nvmf_conn *conn = spdk_event_get_arg2(event);
|
||||||
|
|
||||||
nvmf_disconnect(session, conn);
|
nvmf_disconnect(session, conn);
|
||||||
|
if (session && session->num_connections == 0) {
|
||||||
|
spdk_nvmf_session_destruct(session);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user