diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-03-27 02:22:42 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-27 10:22:42 +0100 |
commit | 8ed6de4fe6517dc4db38ab5dea898c0016d1c08a (patch) | |
tree | f0b123290da969e167512f7834ee4d6362385f7e | |
parent | b1b767ed0db19b337ab41fab9241227d23aaae38 (diff) | |
download | Nim-8ed6de4fe6517dc4db38ab5dea898c0016d1c08a.tar.gz |
fix flaky tnetconnect which sometimes failed with: No route to host [OSError] (#17526)
-rw-r--r-- | tests/stdlib/tnetconnect.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/stdlib/tnetconnect.nim b/tests/stdlib/tnetconnect.nim index b74545710..3a80df19f 100644 --- a/tests/stdlib/tnetconnect.nim +++ b/tests/stdlib/tnetconnect.nim @@ -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() |