diff src/stream/ngx_stream_write_filter_module.c @ 7665:d127837c714f

Stream: fixed processing of zero length UDP packets (ticket #1982).
author Vladimir Homutov <vl@nginx.com>
date Mon, 08 Jun 2020 11:40:34 +0300
parents a7ff19afbb14
children 32b0ba4855a6
line wrap: on
line diff
--- a/src/stream/ngx_stream_write_filter_module.c
+++ b/src/stream/ngx_stream_write_filter_module.c
@@ -234,7 +234,8 @@ ngx_stream_write_filter(ngx_stream_sessi
 
     if (size == 0
         && !(c->buffered & NGX_LOWLEVEL_BUFFERED)
-        && !(last && c->need_last_buf))
+        && !(last && c->need_last_buf)
+        && !(c->type == SOCK_DGRAM && flush))
     {
         if (last || flush || sync) {
             for (cl = *out; cl; /* void */) {