aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/c/http.c
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2013-12-11 14:57:54 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2013-12-11 14:57:54 -0500
commita8459c0104ca36fd058ea527890116c7a1bca8fd (patch)
tree00c51911af9b45c7c29ef1ba89f02a3d49f0fd69 /src/c/http.c
parenta22814f0ea7501eba5dc86413ba9851e97deed2e (diff)
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
Diffstat (limited to 'src/c/http.c')
-rw-r--r--src/c/http.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/c/http.c b/src/c/http.c
index 5ceca059..d19ce350 100644
--- a/src/c/http.c
+++ b/src/c/http.c
@@ -260,7 +260,9 @@ static void *worker(void *data) {
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;