repositories
/
deb_shairplay.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
590c2b2
)
Fix #23 on issue tracker.
author
Juho Vähä-Herttua
<juhovh@iki.fi>
Mon, 24 Mar 2014 18:35:29 +0000
(20:35 +0200)
committer
Juho Vähä-Herttua
<juhovh@iki.fi>
Mon, 24 Mar 2014 18:35:29 +0000
(20:35 +0200)
There is a race condition if IPv4 and IPv6 connections come at the same time.
src/lib/httpd.c
patch
|
blob
|
blame
|
history
diff --git
a/src/lib/httpd.c
b/src/lib/httpd.c
index 1d9e7e2eb454334efec4f6e7ba106a7f9c9104a7..f081c5e65cc74eb4c10f8ac7ad2818a50cffc73f 100644
(file)
--- a/
src/lib/httpd.c
+++ b/
src/lib/httpd.c
@@
-237,7
+237,8
@@
httpd_thread(void *arg)
continue;
}
}
- if (httpd->server_fd6 != -1 && FD_ISSET(httpd->server_fd6, &rfds)) {
+ if (httpd->open_connections < httpd->max_connections &&
+ httpd->server_fd6 != -1 && FD_ISSET(httpd->server_fd6, &rfds)) {
ret = httpd_accept_connection(httpd, httpd->server_fd6, 1);
if (ret == -1) {
break;