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.
This commit is contained in:
Max Romanov
2019-03-05 15:38:48 +03:00
parent f3a0d95d09
commit aedb999fe1

View File

@@ -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;