Remove floating point math from server.c (fixes #1402)
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2381 152afb58-edef-0310-8abb-c4023f1b3aa9svn/tags/lighttpd-1.4.21
parent
4642508de3
commit
832ff277f2
1
NEWS
1
NEWS
|
@ -27,6 +27,7 @@ NEWS
|
|||
* Do not pass Proxy-Connection: header from client to backend http server in mod_proxy (#1877)
|
||||
* Fix wrong malloc sizes in mod_accesslog (probably nothing bad happened...) (fixes #1855, thx ycheng)
|
||||
* Some small buffer.c fixes (closes #1837)
|
||||
* Remove floating point math from server.c (fixes #1402)
|
||||
|
||||
- 1.4.20 - 2008-09-30
|
||||
|
||||
|
|
|
@ -1295,7 +1295,7 @@ int main (int argc, char **argv) {
|
|||
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 */
|
||||
if ((srv->cur_fds + srv->want_fds < srv->max_fds * 8 / 10) && /* we have enough unused fds */
|
||||
(srv->conns->used < srv->max_conns * 0.9) &&
|
||||
(0 == graceful_shutdown)) {
|
||||
for (i = 0; i < srv->srv_sockets.used; i++) {
|
||||
|
@ -1308,7 +1308,7 @@ int main (int argc, char **argv) {
|
|||
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 */
|
||||
|
||||
|
|
Loading…
Reference in New Issue