Closed wsxjbupt closed 2 months ago
Pair blocks if there is no receiver. That's by design.
If you want to fail the send instead, use nng_aio_set_timeout() to set a short timeout.
It also blocks due to backpressure.
If you want a non-blocking (but will lose messages if receiver cannot keep up) pattern, check out PUB/SUB.
I'm closing this because there isn't a bug.
Describe the bug Sendmsg Thread Blocking
Expected behavior normal running.
Actual Behavior Use the pair_0 protocol for communication, Occasional Sendmsg Thread Block on function nng_aio_wait,Check the call stack information. Everything is normal, pair0_sock->wmq is full, sendmsg thread block on funciton nng_aio_wait,all nng_task is idle. After receiving the message from the peer end, everything returns to normal.
To Reproduce If possible include actual reproduction test code here. Minimal C test cases are perferred.
Environment Details
Additional context Add any other context about the problem here.