RPC: properly handle the semaphore in error case
This is to fix below issue: https://github.com/spdk/spdk/issues/1076 The problem is that the semaphore is not increased and the wait operation time out. Change-Id: I56e950d0705663b35de9257f17c400c31636ee34 Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476048 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Liang Yan <liang.z.yan@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
b70eb775eb
commit
cd433e7ef9
@ -338,6 +338,7 @@ rpc_server_th(void *arg)
|
||||
rc = spdk_rpc_listen(g_rpcsock_addr);
|
||||
if (rc) {
|
||||
fprintf(stderr, "spdk_rpc_listen() failed: %d\n", rc);
|
||||
sem_post(&g_rpc_server_th_listening);
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user