Try both internet interfaces to prevent heavily delayed start of the multiprocessor debugging. eric7

Sat, 12 Feb 2022 23:05:25 +0100

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Sat, 12 Feb 2022 23:05:25 +0100
branch
eric7
changeset 8946
0ca4f57f15b6
parent 8945
b6be65111565
child 8947
579e286300d1

Try both internet interfaces to prevent heavily delayed start of the multiprocessor debugging.

eric7/DebugClients/Python/DebugClientBase.py file | annotate | diff | comparison | revisions
--- a/eric7/DebugClients/Python/DebugClientBase.py	Sat Feb 12 13:02:35 2022 +0100
+++ b/eric7/DebugClients/Python/DebugClientBase.py	Sat Feb 12 23:05:25 2022 +0100
@@ -2050,14 +2050,18 @@
         family = socket.AF_INET if version == 'v4' else socket.AF_INET6
         
         retryCount = 0
-        while retryCount < 10:
+        while retryCount < 20:
             try:
                 addrinfo = socket.getaddrinfo(
                     host, None, family, socket.SOCK_STREAM)
                 return addrinfo[0][4][0]
             except Exception:
                 retryCount += 1
-                time.sleep(3)
+                family = (socket.AF_INET if family == socket.AF_INET6 else
+                    socket.AF_INET6
+                )
+                if retryCount % 2 == 0:
+                    time.sleep(3)
         return None
     
     def main(self):

eric ide

mercurial