Closed larskotthoff closed 8 years ago
Does it stop? Or keep running?
You can verify this by running pgrep python3
and then ps -fp [number]
for each of the numbers pgrep
returns.
If it stops, all we might have to do is also catch socket
errors in the main loop's try .. except SomeException
part.
Is your network connection temporarily down during the first few seconds after resume?
It keeps running (and I get the same error again after the sleep interval). The network connection is indeed down for the first few seconds, but back by the time WeatherDesk runs (and as I've said it runs again afterwards with the same error when the network is definitely working).
Ah. This is a bug in Linux glibc
. And the lead dev Ulrich Drepper didn't seem to care much:
That's what
res_init()
is for, call it.
This requires an ugly hack (loading libc.so
and calling __res_init()
), but it's all we can do till glibc
fixes things.
Fix commited. Please test.
This causes it to fail the first run after suspend/resume, but works after that.
Works fine, thanks! I can't test connecting to a different network after resume now, but will report back if that still causes trouble.
Sorry, I'm getting the exact same error now after resuming on a different network.
Did you see my note? It says it will fail the first run after resume, but works after that.
What if you kill and restart the process?
Also, you mean if you just suspend/resume, it works, but if you suspend, then resume in a different network, it doesn't?
This was resuming on a different network. I've tried it again and now it works after the one fail. Not sure what happened before -- I guess the wireless disconnected just when the script ran for a second? Anyway, it's working now. Sorry for the noise!
After I suspend and resume my laptop, WeatherDesk stops working. I get the following error on the first run after resume:
I'm running Python 3.5.1 on Arch Linux.