diff src/c/http.c @ 1931:1a04b1edded2

Fix regression in http.c for long-polling connections; add lazy initialization of database connections, to avoid the overhead in handlers that don't use SQL
author Adam Chlipala <adam@chlipala.net>
date Wed, 11 Dec 2013 14:57:54 -0500
parents 5a7ae5acdcea
children 420d129c4174
line wrap: on
line diff
--- a/src/c/http.c	Wed Dec 11 11:06:08 2013 -0500
+++ b/src/c/http.c	Wed Dec 11 14:57:54 2013 -0500
@@ -260,7 +260,9 @@
             close(sock);
             sock = 0;
           }
-        } else if (rr != KEEP_OPEN)
+        } else if (rr == KEEP_OPEN)
+          sock = 0;
+        else
           fprintf(stderr, "Illegal uw_request return code: %d\n", rr);
 
         break;