From 18511a1196e7d4ca6a8e7f4b20199816e35f6933 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 18 Mar 2003 15:41:14 +0000 Subject: [PATCH] Bump the timeout to 10 seconds (and get rid of the 3 tries) so we don't * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the timeout to 10 seconds (and get rid of the 3 tries) so we don't fail to connect just because the server is slow/far away. --- ChangeLog | 6 ++++++ libsoup/soup-openssl.c | 9 +++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58864f2..43773f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-03-18 Dan Winship + + * libsoup/soup-openssl.c (soup_openssl_get_iochannel): Bump the + timeout to 10 seconds (and get rid of the 3 tries) so we don't + fail to connect just because the server is slow/far away. + 2003-03-17 Joe Shaw * configure.in: Bump up to 1.99.15. diff --git a/libsoup/soup-openssl.c b/libsoup/soup-openssl.c index 94e9404..c602c4e 100644 --- a/libsoup/soup-openssl.c +++ b/libsoup/soup-openssl.c @@ -336,7 +336,6 @@ soup_openssl_get_iochannel (GIOChannel *sock) SSL *ssl; X509 *cert; gchar *ccert_file, *ckey_file; - int tries = 0; g_return_val_if_fail (sock != NULL, NULL); @@ -394,7 +393,7 @@ soup_openssl_get_iochannel (GIOChannel *sock) fd_set ssl_fdset; struct timeval tv; - tv.tv_sec = 1; + tv.tv_sec = 10; tv.tv_usec = 0; if (server_mode) @@ -404,14 +403,12 @@ soup_openssl_get_iochannel (GIOChannel *sock) err = SSL_get_error (ssl, err); - if (tries < 3 && err == SSL_ERROR_WANT_READ) { - tries++; + if (err == SSL_ERROR_WANT_READ) { FD_ZERO (&ssl_fdset); FD_SET (sockfd, &ssl_fdset); select (sockfd + 1, &ssl_fdset, NULL, NULL, &tv); } - else if (tries < 3 && err == SSL_ERROR_WANT_WRITE) { - tries++; + else if (err == SSL_ERROR_WANT_WRITE) { FD_ZERO (&ssl_fdset); FD_SET (sockfd, &ssl_fdset); select (sockfd + 1, NULL, &ssl_fdset, NULL, &tv); -- 2.7.4