rpc: Remove event from module unload path
By the time the module is unloaded, the reactors have already stopped. That means the event will never actually fire. Simply remove it. Change-Id: I4fe371ae7a679d51254d0267fbbbf74c3e9cf477 Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
963777ca36
commit
4044f8b62e
@ -261,27 +261,20 @@ spdk_rpc_initialize(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
spdk_rpc_finish_cleanup(void *arg1, void *arg2)
|
|
||||||
{
|
|
||||||
if (g_jsonrpc_server) {
|
|
||||||
spdk_jsonrpc_server_shutdown(g_jsonrpc_server);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
spdk_rpc_finish(void)
|
spdk_rpc_finish(void)
|
||||||
{
|
{
|
||||||
struct spdk_event *complete;
|
|
||||||
|
|
||||||
if (g_rpc_listen_addr_unix.sun_path[0]) {
|
if (g_rpc_listen_addr_unix.sun_path[0]) {
|
||||||
/* Delete the Unix socket file */
|
/* Delete the Unix socket file */
|
||||||
unlink(g_rpc_listen_addr_unix.sun_path);
|
unlink(g_rpc_listen_addr_unix.sun_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
complete = spdk_event_allocate(spdk_app_get_current_core(), spdk_rpc_finish_cleanup,
|
spdk_poller_unregister(&g_rpc_poller, NULL);
|
||||||
NULL, NULL);
|
|
||||||
spdk_poller_unregister(&g_rpc_poller, complete);
|
if (g_jsonrpc_server) {
|
||||||
|
spdk_jsonrpc_server_shutdown(g_jsonrpc_server);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user