Skip to content

Commit 8d6ada3

Browse files
committed
simplify threaded dispatcher error path
1 parent ce1dccc commit 8d6ada3

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/thread.c

+2-7
Original file line numberDiff line numberDiff line change
@@ -637,13 +637,8 @@ static void rnng_dispatch_thread(void *args) {
637637
nng_ctx_send(ctx[i], saio[i]->aio);
638638
nng_ctx_recv(ctx[i], raio[i]->aio);
639639
} else {
640-
nng_msg_alloc(&msg, 0);
641-
nng_msg_append(msg, (unsigned char *) &xc, sizeof(int));
642-
if ((xc = nng_ctx_sendmsg(rctx[i], msg, 0)))
643-
nng_msg_free(msg);
644-
nng_ctx_close(rctx[i]);
645-
nng_ctx_open(&rctx[i], hsock);
646-
nng_ctx_recv(rctx[i], haio[i]->aio);
640+
// should never reach here
641+
goto exitlevel2;
647642
}
648643
break;
649644
}

0 commit comments

Comments
 (0)