Skip to content

Commit

Permalink
use nonblock for request() ack
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Oct 31, 2023
1 parent 58a0b61 commit ad35a6e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: nanonext
Type: Package
Title: NNG (Nanomsg Next Gen) Lightweight Messaging Library
Version: 0.10.2.9018
Version: 0.10.2.9019
Description: R binding for NNG (Nanomsg Next Gen), a successor to ZeroMQ. NNG is
a socket library implementing 'Scalability Protocols', a reliable,
high-performance standard for common communications patterns including
Expand Down
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nanonext 0.10.2.9018 (development)
# nanonext 0.10.2.9019 (development)

#### New Features

Expand All @@ -10,6 +10,7 @@
* `lock()` supplying 'cv' has improved behaviour which locks the socket whilst allowing for both initial connections and re-connections (when the 'cv' is registered for both add and remove pipe events).
* Improves listener / dialer logic for TLS connections, allowing *inter alia* synchronous dials.
* `pipe_notify()` arguments 'add', 'remove' and 'flag' now default to FALSE instead of TRUE for easier selective specification of the events to signal.
* `request()` argument 'ack' behaviour is more robust.
* Fixes memory leaks detected with valgrind.
* Upgrades bundled 'libmbedtls' to v 3.5.0.

Expand Down
2 changes: 1 addition & 1 deletion src/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static void raio_complete_ack(void *arg) {
#else

if (nng_msg_alloc(&msg, 0) == 0) {
if (nng_ctx_sendmsg(*ctx, msg, 0))
if (nng_ctx_sendmsg(*ctx, msg, NNG_FLAG_NONBLOCK))
nng_msg_free(msg);
}
raio->result = res - !res;
Expand Down

0 comments on commit ad35a6e

Please sign in to comment.