diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-03-05 15:38:48 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-03-05 15:38:48 +0300 |
commit | aedb999fe19d47ca0faf91752d7be4b227c51021 (patch) | |
tree | e10f17a58a4171621d7c976a6b0f6c9aaf9de5e1 /src/nxt_port_socket.c | |
parent | f3a0d95d093569f80552878560457d3addfc4b01 (diff) | |
download | unit-aedb999fe19d47ca0faf91752d7be4b227c51021.tar.gz unit-aedb999fe19d47ca0faf91752d7be4b227c51021.tar.bz2 |
Including port message header into message size limit.
Before this fix, large plain message (i.e. configuration) send may fail
with the 'Message too big' error, because internal fragmentation
implementation does not account for 16 byte message header.
This closes #167 issue on GitHub.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_port_socket.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nxt_port_socket.c b/src/nxt_port_socket.c index 01fe2dab..8694ef65 100644 --- a/src/nxt_port_socket.c +++ b/src/nxt_port_socket.c @@ -349,6 +349,8 @@ nxt_port_write_handler(nxt_task_t *task, void *obj, void *data) iov[0].iov_len += sizeof(msg->tracking_msg); } + sb.limit -= iov[0].iov_len; + nxt_sendbuf_mem_coalesce(task, &sb); plain_size = sb.size; |