summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port_rpc.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-12-27 17:48:04 +0300
committerMax Romanov <max.romanov@nginx.com>2017-12-27 17:48:04 +0300
commit5196cf4d5003dade99321f71bcc1af80f0e5ad50 (patch)
tree7e087e5135793b55922082f18a84b387832cac63 /src/nxt_port_rpc.c
parentbaa8c9387b00dc3cd72cfca14c61c25a2badada9 (diff)
downloadunit-5196cf4d5003dade99321f71bcc1af80f0e5ad50.tar.gz
unit-5196cf4d5003dade99321f71bcc1af80f0e5ad50.tar.bz2
Rescheduling of pending request after configured timeout.
New optional configuration parameter introduced: limits.reschedule_timeout. Default value 1 second. In the case when request is written to the port socket 'in advance', it is called 'pending'. On every completed request, the head of pending request is checked against reschedule timeout. If this request waiting for execution longer than timeout, it is cancelled, new port selected for this request.
Diffstat (limited to 'src/nxt_port_rpc.c')
-rw-r--r--src/nxt_port_rpc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/nxt_port_rpc.c b/src/nxt_port_rpc.c
index 15c550f4..b041256a 100644
--- a/src/nxt_port_rpc.c
+++ b/src/nxt_port_rpc.c
@@ -314,10 +314,6 @@ nxt_port_rpc_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
reg = lhq.value;
- if (reg->peer != -1) {
- nxt_assert(reg->peer == msg->port_msg.pid);
- }
-
if (type == _NXT_PORT_MSG_RPC_ERROR) {
reg->error_handler(task, msg, reg->data);