summaryrefslogtreecommitdiff
path: root/opentracker.c
diff options
context:
space:
mode:
Diffstat (limited to 'opentracker.c')
-rw-r--r--opentracker.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/opentracker.c b/opentracker.c
index b54327a..27b2570 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -180,12 +180,11 @@ static void handle_write(const int64_t sock) {
180 180
181 /* In a chunked transfer, wait for the next piece once everything queued has gone out */ 181 /* In a chunked transfer, wait for the next piece once everything queued has gone out */
182 if (chunked) 182 if (chunked)
183 http_interest_drop(sock, cookie, EVENT_OUT); 183 http_interest_set(sock, cookie, 0);
184 else if (keep_alive) { 184 else if (keep_alive) {
185 /* The reply is out and the client asked to keep the connection, so stop 185 /* The reply is out and the client asked to keep the connection, so go
186 waiting to write and go back to waiting for the next request */ 186 back to waiting for the next request */
187 http_interest_drop(sock, cookie, EVENT_OUT); 187 http_interest_set(sock, cookie, EVENT_IN);
188 http_interest_add(sock, cookie, EVENT_IN);
189 fdstate_set_expiry(sock, time_future_seconds(OT_CLIENT_TIMEOUT)); 188 fdstate_set_expiry(sock, time_future_seconds(OT_CLIENT_TIMEOUT));
190 } else 189 } else
191 http_close(sock); 190 http_close(sock);