Closed JasonLG1979 closed 1 year ago
This is another of those fixes that's been in Raspotify for months. It's helps to prevent librespot from spaming the logs at boot when it's used as a service.
The functionality seems good to me, however I recommend that you use the sysinfo
crate to get the current uptime. We're already using that crate, so can avoid adding another one (or, if it depends on uptime
itself, have a common facade).
The functionality seems good to me, however I recommend that you use the
sysinfo
crate to get the current uptime. We're already using that crate, so can avoid adding another one (or, if it depends onuptime
itself, have a common facade).
Are we using sysinfo
in main at all? Is there a point to pulling in sysinfo
just for uptime when uptime is a super, super tiny crate comapred to sysinfo
when all we'd be using is the uptime functionality?
Don't know about main
but it's used in librespot-core
, so no main
without it.
Ok if I can pull it in in main for free it makes since to use it then.
OK let me know when you have and please also add a changelog entry so we can merge.
OK let me know when you have and please also add a changelog entry so we can merge.
Done.
When started at boot as a service discovery may fail due to it trying to bind to interfaces before the network is actually up. This could be prevented in systemd by starting the service after network-online.target but it requires that a wait-online.service is also enabled which is not always the case since a wait-online.service can potentially hang the boot process until it times out in certain situations. This allows for discovery to retry every 10 secs in the 1st 60 secs of uptime before giving up thus papering over the issue and not holding up the boot process.