]> git.kaiwu.me - nginx.git/commit
Stream: do not split datagrams when limiting proxy rate.
authorRoman Arutyunyan <arut@nginx.com>
Thu, 27 Dec 2018 16:37:34 +0000 (19:37 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Thu, 27 Dec 2018 16:37:34 +0000 (19:37 +0300)
commit12645b46e96426719ce96426239e45cfd93ed90c
treea2a7ed17011f65024f44df83258a7c366b916749
parent36a0713244a28266beefd5703521949a5fa994ca
Stream: do not split datagrams when limiting proxy rate.

Previously, when using proxy_upload_rate and proxy_download_rate, the buffer
size for reading from a socket could be reduced as a result of rate limiting.
For connection-oriented protocols this behavior is normal since unread data will
normally be read at the next iteration.  But for datagram-oriented protocols
this is not the case, and unread part of the datagram is lost.

Now buffer size is not limited for datagrams.  Rate limiting still works in this
case by delaying the next reading event.
src/stream/ngx_stream_proxy_module.c