aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/lighttpd/lighttpd/src-server.c.patch
blob: dbf614b2bdc318e28a859ef3622fac72b890dfc0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
upstream: http://trac.lighttpd.net/trac/ticket/1402
status: pending

--- lighttpd/src/server.c.orig	2006-03-04 09:12:17.000000000 -0800
+++ lighttpd/src/server.c	2006-07-11 09:16:28.000000000 -0700
@@ -1174,8 +1174,8 @@
 		if (srv->sockets_disabled) {
 			/* our server sockets are disabled, why ? */
 
-			if ((srv->cur_fds + srv->want_fds < srv->max_fds * 0.8) && /* we have enough unused fds */
-			    (srv->conns->used < srv->max_conns * 0.9) &&
+			if ((srv->cur_fds + srv->want_fds < srv->max_fds * 8 / 10) && /* we have enough unused fds */
+			    (srv->conns->used < srv->max_conns * 9 / 10) &&
 			    (0 == graceful_shutdown)) {
 				for (i = 0; i < srv->srv_sockets.used; i++) {
 					server_socket *srv_socket = srv->srv_sockets.ptr[i];
@@ -1187,7 +1187,7 @@
 				srv->sockets_disabled = 0;
 			}
 		} else {
-			if ((srv->cur_fds + srv->want_fds > srv->max_fds * 0.9) || /* out of fds */
+			if ((srv->cur_fds + srv->want_fds > srv->max_fds * 9 / 10) || /* out of fds */
 			    (srv->conns->used > srv->max_conns) || /* out of connections */
 			    (graceful_shutdown)) { /* graceful_shutdown */