fetcher: set timeouts on HTTP connections
We're seeing some hangs while ostree is fetching updates. I imagine the fact that SoupSessionAsync has no timeout by default could be the cause of this. Set timeout values to 60 seconds, which is the default for the new SoupSession API which we may switch to later. https://bugzilla.gnome.org/show_bug.cgi?id=724310
This commit is contained in:
parent
371cebf258
commit
8ccd603cba
|
|
@ -153,6 +153,8 @@ ostree_fetcher_init (OstreeFetcher *self)
|
||||||
SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE,
|
SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE,
|
||||||
SOUP_SESSION_USE_THREAD_CONTEXT, TRUE,
|
SOUP_SESSION_USE_THREAD_CONTEXT, TRUE,
|
||||||
SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_REQUESTER,
|
SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_REQUESTER,
|
||||||
|
SOUP_SESSION_TIMEOUT, 60,
|
||||||
|
SOUP_SESSION_IDLE_TIMEOUT, 60,
|
||||||
NULL);
|
NULL);
|
||||||
self->requester = (SoupRequester *)soup_session_get_feature (self->session, SOUP_TYPE_REQUESTER);
|
self->requester = (SoupRequester *)soup_session_get_feature (self->session, SOUP_TYPE_REQUESTER);
|
||||||
g_object_get (self->session, "max-conns-per-host", &max_conns, NULL);
|
g_object_get (self->session, "max-conns-per-host", &max_conns, NULL);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue