From: Thomas Heil Date: Tue, 21 Sep 2010 22:06:37 +0000 (+0000) Subject: [packages] haproxy: re-enable polling on listener() when memory shortage occours... X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=d0cfe50227edb87112e83cf838588707c8848dff;hp=2c06f3818e3c57334736a058e7192a8a65965832 [packages] haproxy: re-enable polling on listener() when memory shortage occours after accept - thanks to Willy Tarreau SVN-Revision: 23108 --- diff --git a/net/haproxy/Makefile b/net/haproxy/Makefile index fcd0243d9f..6959a8e11c 100644 --- a/net/haproxy/Makefile +++ b/net/haproxy/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=haproxy PKG_VERSION:=1.4.8 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://haproxy.1wt.eu/download/1.4/src diff --git a/net/haproxy/patches/001-clean-listener-ressource-shortage.patch b/net/haproxy/patches/001-clean-listener-ressource-shortage.patch new file mode 100644 index 0000000000..1299e5e26e --- /dev/null +++ b/net/haproxy/patches/001-clean-listener-ressource-shortage.patch @@ -0,0 +1,38 @@ +--- a/src/client.c ++++ b/src/client.c +@@ -1,7 +1,7 @@ + /* + * Client-side variables and functions. + * +- * Copyright 2000-2009 Willy Tarreau ++ * Copyright 2000-2010 Willy Tarreau + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -121,7 +122,7 @@ int event_accept(int fd) { + + if ((s = pool_alloc2(pool2_session)) == NULL) { /* disable this proxy for a while */ + Alert("out of memory in event_accept().\n"); +- EV_FD_CLR(fd, DIR_RD); ++ disable_listener(l); + p->state = PR_STIDLE; + goto out_close; + } +@@ -149,7 +150,7 @@ int event_accept(int fd) { + + if ((t = task_new()) == NULL) { /* disable this proxy for a while */ + Alert("out of memory in event_accept().\n"); +- EV_FD_CLR(fd, DIR_RD); ++ disable_listener(l); + p->state = PR_STIDLE; + goto out_free_session; + } +