diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-11-27 14:37:59 +0000 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2009-12-07 10:43:04 +0000 |
commit | fbad85953c6791382d204c886f17e1eaa4eba5e5 (patch) | |
tree | 009d1b62d2f404c78a48275439864cb788abbfb6 /src | |
parent | 77c4e09576106791a30409af8e402dc14be1396b (diff) |
gabble_bytestream_factory_query_socks5_proxies: always request at least one proxy
This ensure to always have at least one fresh proxy in the cache.
Diffstat (limited to 'src')
-rw-r--r-- | src/bytestream-factory.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/bytestream-factory.c b/src/bytestream-factory.c index 8ba82aa34..2c4ce4c00 100644 --- a/src/bytestream-factory.c +++ b/src/bytestream-factory.c @@ -375,13 +375,16 @@ gabble_bytestream_factory_query_socks5_proxies (GabbleBytestreamFactory *self) if (nb_proxies_found >= NB_MIN_SOCKS5_PROXIES) { - DEBUG ("we already have discovered enough proxies (%u)", + DEBUG ("we already have discovered enough proxies (%u); " + "request just one to refresh our cache", nb_proxies_found); - return; + nb_proxies_needed = 1; + } + else + { + nb_proxies_needed = NB_MIN_SOCKS5_PROXIES - nb_proxies_found; + DEBUG ("Need %u more proxies", nb_proxies_needed); } - - nb_proxies_needed = NB_MIN_SOCKS5_PROXIES - nb_proxies_found; - DEBUG ("Need %u more proxies", nb_proxies_needed); for (i = 0; i < nb_proxies_needed && priv->socks5_potential_proxies != NULL; i++) |