PromyLOPh / pianobar

Console-based pandora.com player
http://6xq.net/pianobar/
Other
1.73k stars 323 forks source link

pianobar gives up immediately on certain Network errors #725

Closed haarp closed 3 months ago

haarp commented 2 years ago

Subject of the issue

When pianobar encounters some Network errors, such as Login... Network error: Failure when receiving data from the peer or Network error: SSL connect error, it'll immediately give up, ignoring the max_retry value in the config. This is problematic when using public proxies as control_proxy, as these tend to be very unreliable but usually work eventually.

Your environment

pianobar 2020.11.28 on Gentoo Linux config:

control_proxy = ...
max_retry = 30

Steps to reproduce

Expected behaviour

Multiple retries

Actual behaviour

No retry

Thanks a lot! :)

PromyLOPh commented 2 years ago

I looked at libcurl’s error codes and added those, which looked like temporary errors to a list of errors to retry. Does this work for you? https://6xq.net/paste/pianobar-temperror.patch.html

haarp commented 2 years ago

This seems better in my testing so far, thanks! Some errors still instantly make it bail out tho, such as Error: Invalid response.. Funny what kind of network problems hese proxies can deliver...

PromyLOPh commented 2 years ago

That particular error is not coming from the network layer/curl though. Your proxy is most likely serving you something that is not coming from Pandora (i.e. not a proper JSON response). What else are you seeing?

haarp commented 2 years ago

What else are you seeing?

I've been testing with that patch for over a month now, and haven't seen any other errors besides the Invalid response one.

governor22 commented 10 months ago

@haarp @PromyLOPh I just installed pianobar and get this error:

(i) Login... Network error: Couldn't resolve proxy name

I've looked at the pianobar config file and it shows:

control_proxy = http://xxx.xxx.xxx.xxx:xx

*****EDIT:

OK, just deleted the control_proxy line and it's working now!