Two interrelated things/problems I see is that a) you work on too high a level 
for what you want and b) you do not really have a basis to decide what's in the 
"healthy" (desired) range and what's not.

Maybe my point gets more clear by this: There _are_ timing out functions 
available in Nim but probably (don't know, must guess because I don't do http 
stuff on a convenience level) not available on the level you use (http.get etc).

That said it seems to me that the level you use is fine -but- it's meant for 
easy quick and dirty "get something from a web page" and not for the kind of 
control you need.

Maybe (sorry, didn't think a lot about it) one helpful approach would be to 
fire off an async sleep right before your http get call and upon the sleeper 
being finished you could check whether the http get already delivered a result 
or not (and hence there probably is a network problem).

Reply via email to