summaryrefslogtreecommitdiff
path: root/weather-widget
diff options
context:
space:
mode:
authorstreetturtle <streetturtle@users.noreply.github.com>2020-07-22 22:30:49 -0400
committerGitHub <noreply@github.com>2020-07-22 22:30:49 -0400
commit060b808dce9884b59d825d9a0562cb7de60f4f05 (patch)
tree716bd21b202368644fcebb755b5f7eab2059874e /weather-widget
parent88d951635a157db1d3da2073490574c2674a2ea3 (diff)
parentc64243d23bbe5e35088dcb6e3ff5353d288ebda3 (diff)
Merge pull request #173 from webknjaz/bugfixes/weather-curl-timeout
Special-case a curl connection timeout @ ⛅ widget
Diffstat (limited to 'weather-widget')
-rw-r--r--weather-widget/weather.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/weather-widget/weather.lua b/weather-widget/weather.lua
index e3fe118..7e65901 100644
--- a/weather-widget/weather.lua
+++ b/weather-widget/weather.lua
@@ -393,7 +393,13 @@ local function worker(args)
local function update_widget(widget, stdout, stderr)
if stderr ~= '' then
if not warning_shown then
- if stderr ~= 'curl: (52) Empty reply from server' then
+ if (
+ stderr ~= 'curl: (52) Empty reply from server' and
+ stderr ~= 'curl: (28) Failed to connect to api.openweathermap.org port 443: Connection timed out' and
+ stderr:find(
+ '^curl: %(18%) transfer closed with %d+ bytes remaining to read$'
+ ) ~= nil
+ ) then
show_warning(stderr)
end
warning_shown = true