diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2012-09-22 13:44:47 +0100 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2012-09-22 13:44:47 +0100 | 
| commit | 11ec07811cc41e1b244467d25772ef021be9db1b (patch) | |
| tree | 007b2e6b223bd9f6682fdfd21d3d1738b9abd71c | |
| parent | d0752e8b08d37395fd036046552fa6b4fb92ac17 (diff) | |
Since I can't figure out where the stalls are coming from at this point, at
least have a work-around for it.
After hitting the Twitter timer a few times while a previous fetch still
seems to be running, close the connection. Auto-reconnect will do the rest.
| -rw-r--r-- | lib/http_client.c | 2 | ||||
| -rw-r--r-- | protocols/twitter/twitter_lib.c | 5 | 
2 files changed, 5 insertions, 2 deletions
| diff --git a/lib/http_client.c b/lib/http_client.c index 6e7c7b72..7ed539d0 100644 --- a/lib/http_client.c +++ b/lib/http_client.c @@ -72,7 +72,7 @@ struct http_request *http_dorequest( char *host, int port, int ssl, char *reques  	if( getenv( "BITLBEE_DEBUG" ) )  		printf( "About to send HTTP request:\n%s\n", req->request ); -	return( req ); +	return req;  }  struct http_request *http_dorequest_url( char *url_string, http_input_function func, gpointer data ) diff --git a/protocols/twitter/twitter_lib.c b/protocols/twitter/twitter_lib.c index 757cb6fe..8e2804a5 100644 --- a/protocols/twitter/twitter_lib.c +++ b/protocols/twitter/twitter_lib.c @@ -734,7 +734,10 @@ void twitter_get_timeline(struct im_connection *ic, gint64 next_cursor)  	gboolean include_mentions = set_getbool(&ic->acc->set, "fetch_mentions");  	if (td->flags & TWITTER_DOING_TIMELINE) { -		return; +		if (++td->http_fails >= 5) { +			imcb_error(ic, "Fetch timeout (%d)", td->flags); +			imc_logout(ic, TRUE); +		}  	}  	td->flags |= TWITTER_DOING_TIMELINE; | 
