diff lib/protocols.c @ 512:2c8a42a63a31

2004-7-25 Brian Masney <masneyb@gftp.org> * lib/protocols.c (gftp_get_transfer_status) - don't force the user to wait to reconnect if the connection to the server timed out
author masneyb
date Sun, 25 Jul 2004 14:25:27 +0000
parents b6ce74de1cd9
children fbb5a02beddb
line wrap: on
line diff
--- a/lib/protocols.c	Sun Jul 25 14:15:00 2004 +0000
+++ b/lib/protocols.c	Sun Jul 25 14:25:27 2004 +0000
@@ -2798,7 +2798,7 @@
     {
       if (num_read == GFTP_EFATAL)
         return (GFTP_EFATAL);
-      else if (!tdata->conn_error_no_timeout)
+      else if (num_read != GFTP_ETIMEDOUT && !tdata->conn_error_no_timeout)
         {
           if (retries != 0 && 
               tdata->current_file_retries >= retries)
@@ -2822,7 +2822,8 @@
       while (retries == 0 || 
              tdata->current_file_retries <= retries)
         {
-          if (!tdata->conn_error_no_timeout && !tdata->skip_file)
+          if (num_read != GFTP_ETIMEDOUT && !tdata->conn_error_no_timeout &&
+              !tdata->skip_file)
             {
               tv.tv_sec = sleep_time;
               tv.tv_usec = 0;
@@ -2833,8 +2834,6 @@
                 }
               while (ret1 == -1 && errno == EINTR);
             }
-          else
-            tdata->conn_error_no_timeout = 0;
 
           if ((ret1 = gftp_connect (tdata->fromreq)) == 0 &&
               (ret2 = gftp_connect (tdata->toreq)) == 0)