Commit cd433e7e authored by GangCao's avatar GangCao Committed by Tomasz Zawadzki
Browse files

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: default avatarGangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476048


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarLiang Yan <liang.z.yan@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent b70eb775
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;
	}