diff --git a/examples/sock/hello_world/hello_sock.c b/examples/sock/hello_world/hello_sock.c index 412c68b4c..f2e6ec6aa 100644 --- a/examples/sock/hello_world/hello_sock.c +++ b/examples/sock/hello_world/hello_sock.c @@ -135,8 +135,10 @@ hello_sock_quit(struct hello_context_t *ctx, int rc) { ctx->rc = rc; spdk_poller_unregister(&ctx->poller_out); - ctx->time_out = spdk_poller_register(hello_sock_close_timeout_poll, ctx, - CLOSE_TIMEOUT_US); + if (!ctx->time_out) { + ctx->time_out = spdk_poller_register(hello_sock_close_timeout_poll, ctx, + CLOSE_TIMEOUT_US); + } return 0; }