From 4882476db3e4493b985823e779ecc892cc53bc58 Mon Sep 17 00:00:00 2001 From: DrunkenAlcoholic Date: Sun, 25 Feb 2024 16:27:13 +0800 Subject: [PATCH] Update getWeather.nim added timeout of 1000 milliseconds --- example status/src/functions/getWeather.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example status/src/functions/getWeather.nim b/example status/src/functions/getWeather.nim index fab5855..bcfdb40 100644 --- a/example status/src/functions/getWeather.nim +++ b/example status/src/functions/getWeather.nim @@ -7,7 +7,7 @@ proc getWeather(): string = result = sWeather # Do something with the weather information else: dTimeStamp = some(now()) - var hClient = newHttpClient() + var hClient = newHttpClient(timeout = 1000) try: sWeather = WEATHER_ICON & hClient.getContent("http://wttr.in/" & CITY & "?format=%t") result = sWeather