mirror of
https://github.com/nginx/nginx.git
synced 2025-06-08 02:02:38 +08:00
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.
This commit is contained in:
parent
b900cc28fc
commit
c36a3c0cba
@ -1331,13 +1331,17 @@ ngx_stream_proxy_process_connection(ngx_event_t *ev, ngx_uint_t from_upstream)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngx_connection_error(pc, NGX_ETIMEDOUT, "upstream timed out");
|
||||||
|
|
||||||
if (u->received == 0) {
|
if (u->received == 0) {
|
||||||
ngx_stream_proxy_next_upstream(s);
|
ngx_stream_proxy_next_upstream(s);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ngx_connection_error(c, NGX_ETIMEDOUT, "connection timed out");
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_connection_error(c, NGX_ETIMEDOUT, "connection timed out");
|
|
||||||
ngx_stream_proxy_finalize(s, NGX_STREAM_OK);
|
ngx_stream_proxy_finalize(s, NGX_STREAM_OK);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user