summaryrefslogtreecommitdiff
path: root/www/nginx
diff options
context:
space:
mode:
authorfhajny <fhajny@pkgsrc.org>2017-02-14 10:10:55 +0000
committerfhajny <fhajny@pkgsrc.org>2017-02-14 10:10:55 +0000
commita75ae3e7b36027d2b1c7a6a2c6da9318829cd108 (patch)
treeb041d840f1a5866b20e71994c3d96f7ec4fe5c4d /www/nginx
parentd18888d03c329cddf1b0c87b13aceb94c9bb4bda (diff)
downloadpkgsrc-a75ae3e7b36027d2b1c7a6a2c6da9318829cd108.tar.gz
Patch Nginx eventport support to fix a situation where Nginx can stop servicing events when port_getn() returns a timeout.
Diffstat (limited to 'www/nginx')
-rw-r--r--www/nginx/distinfo3
-rw-r--r--www/nginx/patches/patch-src_event_modules_ngx__eventport__module.c25
2 files changed, 27 insertions, 1 deletions
diff --git a/www/nginx/distinfo b/www/nginx/distinfo
index 67d73bc9f70..9f2b28f99da 100644
--- a/www/nginx/distinfo
+++ b/www/nginx/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.53 2016/11/24 11:35:23 maya Exp $
+$NetBSD: distinfo,v 1.54 2017/02/14 10:10:55 fhajny Exp $
SHA1 (array-var-nginx-module-0.04.tar.gz) = 1fd3bdd05c2d1d7667ed6f7baa612ddf7f630df3
RMD160 (array-var-nginx-module-0.04.tar.gz) = a751a2ce87dcfb88d072779097b4df9f42a415e4
@@ -47,3 +47,4 @@ Size (set-misc-nginx-module-0.30.tar.gz) = 28584 bytes
SHA1 (patch-aa) = 47f0c19b47b115f00ea6e9432d5bb12058c3bc1c
SHA1 (patch-ab) = 7d126a4372aa8575ef01a4bfd9aec9898861c763
SHA1 (patch-auto_lib_pcre_conf) = 500f16808c07ae2fd4016dd662b6f1b0b1efbb91
+SHA1 (patch-src_event_modules_ngx__eventport__module.c) = c8e919f48d68bd5bffc4ad11d9c79dc6da3a0de2
diff --git a/www/nginx/patches/patch-src_event_modules_ngx__eventport__module.c b/www/nginx/patches/patch-src_event_modules_ngx__eventport__module.c
new file mode 100644
index 00000000000..2293ab5d92a
--- /dev/null
+++ b/www/nginx/patches/patch-src_event_modules_ngx__eventport__module.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-src_event_modules_ngx__eventport__module.c,v 1.1 2017/02/14 10:10:55 fhajny Exp $
+
+Fix a situation where Nginx can stop servicing events when port_getn() returns a timeout.
+
+https://github.com/joyent/nginx/commit/bdd0c625236bc25799bd6f81dcf5d774928e8cb0
+
+--- src/event/modules/ngx_eventport_module.c.orig 2017-01-24 14:02:19.000000000 +0000
++++ src/event/modules/ngx_eventport_module.c
+@@ -468,6 +468,16 @@ ngx_eventport_process_events(ngx_cycle_t
+ ngx_time_update();
+ }
+
++ /*
++ * There's a long standing condition with event ports that port_getn() may
++ * return ETIME even when events are available. This would happen if we have
++ * specified a timeout to port_getn() without reaching the number of
++ * requested events.
++ */
++ if (n == -1 && err == ETIME && events > 0) {
++ n = 0;
++ }
++
+ if (n == -1) {
+ if (err == ETIME) {
+ if (timer != NGX_TIMER_INFINITE) {