From cd433e7ef96c021100c53c59766548b10ae30211 Mon Sep 17 00:00:00 2001 From: GangCao Date: Thu, 28 Nov 2019 17:35:28 -0500 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476048 Tested-by: SPDK CI Jenkins Reviewed-by: Liang Yan Reviewed-by: Shuhei Matsumoto Reviewed-by: Tomasz Zawadzki --- test/rpc_client/rpc_client_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/rpc_client/rpc_client_test.c b/test/rpc_client/rpc_client_test.c index 97b8318ec..65540d514 100644 --- a/test/rpc_client/rpc_client_test.c +++ b/test/rpc_client/rpc_client_test.c @@ -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; }