Imported Debian patch 0.9.0-6~trusty
[deb_shairplay.git] / debian / patches / fix-ipv4-ipv6-race.patch
diff --git a/debian/patches/fix-ipv4-ipv6-race.patch b/debian/patches/fix-ipv4-ipv6-race.patch
new file mode 100644 (file)
index 0000000..94333f7
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/src/lib/httpd.c
++++ b/src/lib/httpd.c
+@@ -237,7 +237,8 @@ struct httpd_s {
+                               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;
+