From dd672e2c4d0dcf73a30be3d8f7fc2ec38cb6450e Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sun, 11 Nov 2012 21:52:26 +0000 Subject: Detect and handle streaming connection loss. --- lib/http_client.c | 2 ++ lib/http_client.h | 1 + 2 files changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/http_client.c b/lib/http_client.c index 5fc7731f..793c5cc1 100644 --- a/lib/http_client.c +++ b/lib/http_client.c @@ -301,6 +301,8 @@ static gboolean http_incoming_data( gpointer data, int source, b_input_condition return FALSE; eof: + req->flags |= HTTPC_EOF; + /* Maybe if the webserver is overloaded, or when there's bad SSL support... */ if( req->bytes_read == 0 ) diff --git a/lib/http_client.h b/lib/http_client.h index 38175b70..48b711a4 100644 --- a/lib/http_client.h +++ b/lib/http_client.h @@ -40,6 +40,7 @@ struct http_request; typedef enum http_client_flags { HTTPC_STREAMING = 1, + HTTPC_EOF = 2, } http_client_flags_t; /* Your callback function should look like this: */ -- cgit v1.2.3