diff options
author | Max Romanov <max.romanov@nginx.com> | 2017-06-23 19:20:08 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2017-06-23 19:20:08 +0300 |
commit | abe0d333294248ea654a4f8467d946a6b761b9d7 (patch) | |
tree | 2ed4031664d24d5ee5a0df24b29c8fb399fb9c34 /src | |
parent | b8f126dcdfdf04bb01b70f9590fc64b3e155e119 (diff) | |
download | unit-abe0d333294248ea654a4f8467d946a6b761b9d7.tar.gz unit-abe0d333294248ea654a4f8467d946a6b761b9d7.tar.bz2 |
Increased size of iovec when data passed using shared memory.
Useful for tiny shared memory segment test case.
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_port_socket.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nxt_port_socket.c b/src/nxt_port_socket.c index 2a3a6594..3bf57479 100644 --- a/src/nxt_port_socket.c +++ b/src/nxt_port_socket.c @@ -148,7 +148,8 @@ nxt_port_socket_write(nxt_task_t *task, nxt_port_t *port, nxt_uint_t type, { msg = (nxt_port_send_msg_t *) link; - if (msg->port_msg.stream == stream) { + if (msg->port_msg.stream == stream && + msg->port_msg.reply_port == reply_port) { /* * An fd is ignored since a file descriptor * must be sent only in the first message of a stream. @@ -191,7 +192,7 @@ nxt_port_write_handler(nxt_task_t *task, void *obj, void *data) { ssize_t n; nxt_port_t *port; - struct iovec iov[NXT_IOBUF_MAX]; + struct iovec iov[NXT_IOBUF_MAX * 10]; nxt_queue_link_t *link; nxt_port_send_msg_t *msg; nxt_sendbuf_coalesce_t sb; @@ -227,6 +228,7 @@ nxt_port_write_handler(nxt_task_t *task, void *obj, void *data) if (m == NXT_PORT_METHOD_MMAP) { sb.limit = (1ULL << 31) - 1; + sb.nmax = NXT_IOBUF_MAX * 10 - 1; } nxt_sendbuf_mem_coalesce(task, &sb); |