Skip to content

Commit

Permalink
only retrieve pipe info if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
shikokuchuo committed Nov 29, 2024
1 parent df45d62 commit cab230b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ SEXP rnng_unresolved2(SEXP x) {
SEXP rnng_send_aio(SEXP con, SEXP data, SEXP mode, SEXP timeout, SEXP pipe, SEXP clo) {

const nng_duration dur = timeout == R_NilValue ? NNG_DURATION_DEFAULT : (nng_duration) nano_integer(timeout);
const int pipeid = nano_integer(pipe);
nano_aio *saio;
SEXP aio, env, fun;
nano_buf buf;
Expand All @@ -432,6 +431,7 @@ SEXP rnng_send_aio(SEXP con, SEXP data, SEXP mode, SEXP timeout, SEXP pipe, SEXP
const SEXP ptrtag = NANO_TAG(con);
if ((sock = ptrtag == nano_SocketSymbol) || ptrtag == nano_ContextSymbol) {

const int pipeid = nano_integer(pipe);
nano_encodes(mode) == 2 ? nano_encode(&buf, data) : nano_serialize(&buf, data, NANO_PROT(con));
nng_msg *msg;
saio = R_Calloc(1, nano_aio);
Expand Down

0 comments on commit cab230b

Please sign in to comment.