Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retry connection to Last.fm if no network #3

Open
deadcyclo opened this issue Feb 1, 2014 · 3 comments
Open

Retry connection to Last.fm if no network #3

deadcyclo opened this issue Feb 1, 2014 · 3 comments
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal

Comments

@deadcyclo
Copy link

mopidy-scrobbler doesn't work when using mopidy from the repository. The reason is that the init script starts mopidy before network interfaces are properly available, and scrobbler fails when trying to connect to last.fm. The initial knee-jerk solution would be to change init scripts to wait for network connectivity, but that's not right since mopidy can be used for local content completely without a network connection.

I quickly hacked a fix locally by adding a 5 second delay to the scrobbler start method, but a proper fix would be to catch network exceptions separately from other exceptions and have have network exceptions enter a retry loop that retries every x seconds. I don't have time to create a patch right now, but I might have a chance in a few weeks (if nobody else grabs this first).

@jodal
Copy link
Member

jodal commented Feb 1, 2014

Thanks for the report. Having the extension retry with an increasing waiting time before the next retry until it gets network sounds like the proper solution.

@DmitrySandalov
Copy link

The scrobbler works for me! Installed on a fresh system from debian/ubuntu repo: mopidy 0.19.4-1, mopidy-scrobbler 1.1.0-1. I think the bug is not relevant anymore.
@deadcyclo, does it still affect you?

@jodal
Copy link
Member

jodal commented Oct 2, 2014

Up to and including Debian package 0.19.4-2 the init script has waited for "$network", which simply means basic ethernet working, and not necessarily Internet being available. In the next Debian package update, it'll also wait for the LSB facility "$named", which means that Mopidy should wait with startup until DNS lookups are possible. Ref mopidy/mopidy@a594f65.

I hope this change will help on this issue.

@jodal jodal changed the title Problems with scrobbler when using debian/ubuntu repository Retry connection to Last.fm if no network Mar 22, 2015
@jodal jodal added C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal and removed C-bug Category: This is a bug labels Mar 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: A PR with an enhancement or an issue with an enhancement proposal
Projects
None yet
Development

No branches or pull requests

3 participants