Mercurial > hg > nginx-quic
annotate auto/define @ 7440:6d4bc025c5a7
Prevented scheduling events on a shared connection.
A shared connection does not own its file descriptor, which means that
ngx_handle_read_event/ngx_handle_write_event calls should do nothing for it.
Currently the c->shared flag is checked in several places in the stream proxy
module prior to calling these functions. However it was not done everywhere.
Missing checks could lead to calling
ngx_handle_read_event/ngx_handle_write_event on shared connections.
The problem manifested itself when using proxy_upload_rate and resulted in
either duplicate file descriptor error (e.g. with epoll) or incorrect further
udp packet processing (e.g. with kqueue).
The fix is to set and reset the event active flag in a way that prevents
ngx_handle_read_event/ngx_handle_write_event from scheduling socket events.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Mon, 14 Jan 2019 20:36:23 +0300 |
parents | d620f497c50f |
children |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
337
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
337
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
4412 | 3 # Copyright (C) Nginx, Inc. |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
337
diff
changeset
|
4 |
337
4feff829a849
nginx-0.0.3-2004-05-19-00:28:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
5 |
4feff829a849
nginx-0.0.3-2004-05-19-00:28:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
6 cat << END >> $NGX_AUTO_CONFIG_H |
4feff829a849
nginx-0.0.3-2004-05-19-00:28:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 |
4feff829a849
nginx-0.0.3-2004-05-19-00:28:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 #ifndef $have |
4feff829a849
nginx-0.0.3-2004-05-19-00:28:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
9 #define $have $value |
4feff829a849
nginx-0.0.3-2004-05-19-00:28:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 #endif |
4feff829a849
nginx-0.0.3-2004-05-19-00:28:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
11 |
4feff829a849
nginx-0.0.3-2004-05-19-00:28:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
12 END |