mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-04 02:44:44 +00:00
fix flaky tnetconnect which sometimes failed with: No route to host [OSError] (#17526)
This commit is contained in:
@@ -17,10 +17,11 @@ proc test() =
|
||||
wrapSocket(ctx, socket)
|
||||
|
||||
# trying 2 sites makes it more resilent: refs #17458 this could give:
|
||||
# Error: unhandled exception: Call to 'connect' timed out. [TimeoutError]
|
||||
# * Call to 'connect' timed out. [TimeoutError]
|
||||
# * No route to host [OSError]
|
||||
try:
|
||||
fn("www.nim-lang.org")
|
||||
except TimeoutError:
|
||||
except TimeoutError, OSError:
|
||||
fn("www.google.com")
|
||||
|
||||
test()
|
||||
|
||||
Reference in New Issue
Block a user