Also consider connection time out a network error
authorKlaus Aehlig <aehlig@google.com>
Thu, 26 Mar 2015 10:56:09 +0000 (11:56 +0100)
committerKlaus Aehlig <aehlig@google.com>
Thu, 26 Mar 2015 15:35:05 +0000 (16:35 +0100)
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Helga Velroyen <helgav@google.com>

lib/rpc/transport.py

index 6112627..df3efed 100644 (file)
@@ -217,7 +217,8 @@ class Transport:
     for try_no in range(0, retries):
       try:
         return fn(try_no)
-      except (socket.error, errors.ConnectionClosedError) as ex:
+      except (socket.error, errors.ConnectionClosedError,
+              errors.TimeoutError) as ex:
         on_error(ex)
         # we retry on a network error, unless it's the last try
         if try_no == retries - 1: