aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/reqrep0/req.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-02-26 00:22:11 -0800
committerGarrett D'Amore <garrett@damore.org>2020-02-26 20:48:22 -0800
commitabab1392c11395d387e3072c4f5788d284846093 (patch)
treedbb1ecb2b166338496981c7d8e3e9e16b977b995 /src/protocol/reqrep0/req.c
parent6a59b15fba1085432c4c18952680e14d80dd134a (diff)
downloadnng-abab1392c11395d387e3072c4f5788d284846093.tar.gz
nng-abab1392c11395d387e3072c4f5788d284846093.tar.bz2
nng-abab1392c11395d387e3072c4f5788d284846093.zip
fixes #1171 message header could be inlined in the message structure
This uses a maximum 64-byte header and should avoid allocations and cache misses, leading to a small performance boost overall.
Diffstat (limited to 'src/protocol/reqrep0/req.c')
-rw-r--r--src/protocol/reqrep0/req.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/protocol/reqrep0/req.c b/src/protocol/reqrep0/req.c
index fea95725..cb716941 100644
--- a/src/protocol/reqrep0/req.c
+++ b/src/protocol/reqrep0/req.c
@@ -667,7 +667,7 @@ req0_ctx_send(void *arg, nni_aio *aio)
}
ctx->request_id = (uint32_t) id;
nni_msg_header_clear(msg);
- nni_msg_header_must_append_u32(msg, ctx->request_id);
+ nni_msg_header_append_u32(msg, ctx->request_id);
// If no pipes are ready, and the request was a poll (no background
// schedule), then fail it. Should be NNG_ETIMEDOUT.