comparison src/stream/ngx_stream_proxy_module.c @ 7105:0846dd76a487

Stream: fixed logging UDP upstream timeout. Previously, when the first UDP response packet was not received from the proxied server within proxy_timeout, no error message was logged before switching to the next upstream. Additionally, when one of succeeding response packets was not received within the timeout, the timeout error had low severity because it was logged as a client connection error as opposed to upstream connection error.
author Roman Arutyunyan <arut@nginx.com>
date Tue, 12 Sep 2017 13:44:04 +0300
parents 7bfbf73db920
children 9c29644f6d03
comparison
equal deleted inserted replaced
7104:cdbcb73239ee 7105:0846dd76a487
1329 1329
1330 ngx_stream_proxy_process(s, 1, 0); 1330 ngx_stream_proxy_process(s, 1, 0);
1331 return; 1331 return;
1332 } 1332 }
1333 1333
1334 ngx_connection_error(pc, NGX_ETIMEDOUT, "upstream timed out");
1335
1334 if (u->received == 0) { 1336 if (u->received == 0) {
1335 ngx_stream_proxy_next_upstream(s); 1337 ngx_stream_proxy_next_upstream(s);
1336 return; 1338 return;
1337 } 1339 }
1340
1341 } else {
1342 ngx_connection_error(c, NGX_ETIMEDOUT, "connection timed out");
1338 } 1343 }
1339 1344
1340 ngx_connection_error(c, NGX_ETIMEDOUT, "connection timed out");
1341 ngx_stream_proxy_finalize(s, NGX_STREAM_OK); 1345 ngx_stream_proxy_finalize(s, NGX_STREAM_OK);
1342 return; 1346 return;
1343 } 1347 }
1344 1348
1345 } else if (ev->delayed) { 1349 } else if (ev->delayed) {