Skip to content

Conversation

@josephkerkhof
Copy link

@josephkerkhof josephkerkhof commented Aug 28, 2023

If there is a network disruption or downtime for the wttr.in service, the curl command should timeout. If the curl command does not have a timeout, it would prevent other dwmblocks from being updated while the sb-forecast or sb-moonphase hangs.

I chose the timeout to be 1 second to be consistent with other status bar scripts like sb-price and sb-iplocate. One second also makes sense because some dwmblock scripts update every second.

@appeasementPolitik
Copy link
Contributor

appeasementPolitik commented Aug 29, 2023

Also look at this PR, I've solved this problem by doing the curl downloading in the background so the rest of the statusbar can run instantly. If there's no internet connection or curl fails, it checks and/or retries every 60 seconds:

#1296

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants