[ostree] fetcher: set timeouts on HTTP connections



commit 8ccd603cba3ad14561a1942b872f977308c36e92
Author: Daniel Drake <drake endlessm com>
Date:   Thu Feb 13 10:57:10 2014 -0600

    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

 src/libostree/ostree-fetcher.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-fetcher.c b/src/libostree/ostree-fetcher.c
index ec3b519..6b55378 100644
--- a/src/libostree/ostree-fetcher.c
+++ b/src/libostree/ostree-fetcher.c
@@ -153,6 +153,8 @@ ostree_fetcher_init (OstreeFetcher *self)
                                                        SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE,
                                                        SOUP_SESSION_USE_THREAD_CONTEXT, TRUE,
                                                        SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_REQUESTER,
+                                                       SOUP_SESSION_TIMEOUT, 60,
+                                                       SOUP_SESSION_IDLE_TIMEOUT, 60,
                                                        NULL);
   self->requester = (SoupRequester *)soup_session_get_feature (self->session, SOUP_TYPE_REQUESTER);
   g_object_get (self->session, "max-conns-per-host", &max_conns, NULL);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]