Skip to content

Commit

Permalink
simplify threaded dispatcher error path
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Sep 30, 2024
1 parent ce1dccc commit 8d6ada3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,13 +637,8 @@ static void rnng_dispatch_thread(void *args) {
nng_ctx_send(ctx[i], saio[i]->aio);
nng_ctx_recv(ctx[i], raio[i]->aio);
} else {
nng_msg_alloc(&msg, 0);
nng_msg_append(msg, (unsigned char *) &xc, sizeof(int));
if ((xc = nng_ctx_sendmsg(rctx[i], msg, 0)))
nng_msg_free(msg);
nng_ctx_close(rctx[i]);
nng_ctx_open(&rctx[i], hsock);
nng_ctx_recv(rctx[i], haio[i]->aio);
// should never reach here
goto exitlevel2;
}
break;
}
Expand Down

0 comments on commit 8d6ada3

Please sign in to comment.