examples/sock: close the right sock object
Change-Id: If26e4ace04e2ab6a950ebd270a46805ed8ca973d Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15956 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
a5283034de
commit
857e8cae85
@ -331,7 +331,7 @@ hello_sock_accept_poll(void *arg)
|
||||
rc = spdk_sock_getaddr(sock, saddr, sizeof(saddr), &sport, caddr, sizeof(caddr), &cport);
|
||||
if (rc < 0) {
|
||||
SPDK_ERRLOG("Cannot get connection addresses\n");
|
||||
spdk_sock_close(&ctx->sock);
|
||||
spdk_sock_close(&sock);
|
||||
return SPDK_POLLER_IDLE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user