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

Fix signaler not exiting on cancel #1638

Merged
merged 2 commits into from Mar 30, 2022

Conversation

isker
Copy link
Contributor

@isker isker commented Mar 2, 2022

break is incorrect here, as it just breaks out of the select.
return to exit the function instead.

Fixes #1636.

`break` is incorrect here, as it just breaks out of the select.
`return` to exit the function instead.

Fixes navidrome#1636.

Signed-off-by: Ian Kerins <ianskerins@gmail.com>
Signed-off-by: Ian Kerins <ianskerins@gmail.com>
@isker
Copy link
Contributor Author

isker commented Mar 2, 2022

Tested with my original use case (binding with a bogus Address):

~/navidrome fix-scheduler-ctx-cancel λ make build && ./navidrome
WARNING: This command does not build the frontend, it uses the latest built with 'make buildjs'
go build -ldflags="-X github.com/navidrome/navidrome/consts.gitSha=f9b15447 -X github.com/navidrome/navidrome/consts.gitTag=v0.47.5-SNAPSHOT" -tags=netgo
 _   _             _     _
| \ | |           (_)   | |
|  \| | __ ___   ___  __| |_ __ ___  _ __ ___   ___
| . ` |/ _` \ \ / / |/ _` | '__/ _ \| '_ ` _ \ / _ \
| |\  | (_| |\ V /| | (_| | | | (_) | | | | | |  __/
\_| \_/\__,_| \_/ |_|\__,_|_|  \___/|_| |_| |_|\___|
                 Version: 0.47.5-SNAPSHOT (f9b15447)

INFO[0000] goose: no migrations to run. current version: 20211105162746 
INFO[0000] Configuring Media Folder                      name="Music Library" path=/tmp/music
INFO[0000] Creating Image cache                          maxSize="100 MB" path=data/cache/images
INFO[0000] Starting scheduler                           
INFO[0000] Finished initializing cache                   cache=Image elapsedTime="184.208µs" maxSize=100MB
INFO[0000] Scheduling periodic scan                      schedule="@every 1m"
INFO[0000] Setting Session Timeout                       value=24h
INFO[0000] Login rate limit set                          requestLimit=5 windowLength=20s
WARN[0000] Unable to find ffmpeg. Transcoding will fail if used  error="exec: \"ffmpeg\": executable file not found in $PATH"
INFO[0000] Spotify integration is not enabled: missing ID/Secret 
INFO[0000] Mounting Native API routes                    path=/api
ERRO[0000] Agent not available. Check configuration      name=spotify
INFO[0000] Creating Transcoding cache                    maxSize="100 MB" path=data/cache/transcoding
INFO[0000] Finished initializing cache                   cache=Transcoding elapsedTime="136.167µs" maxSize=100MB
INFO[0000] Mounting Subsonic API routes                  path=/rest
INFO[0000] Mounting LastFM Auth routes                   path=/api/lastfm
INFO[0000] Mounting ListenBrainz Auth routes             path=/api/listenbrainz
INFO[0000] Mounting WebUI routes                         path=/app
INFO[0000] Navidrome server is ready!                    address="100.123.51.123:4533" startupTime=9.1ms
ERRO[0000] Shutting down Server due to error             error="listen tcp 100.123.51.123:4533: bind: can't assign requested address"
ERRO[0000] Shutting down Signaler due to error           error="listen tcp 100.123.51.123:4533: bind: can't assign requested address"
ERRO[0000] Shutting down Scheduler due to error          error="listen tcp 100.123.51.123:4533: bind: can't assign requested address"
ERRO[0000] Fatal error in Navidrome. Aborting            error="listen tcp 100.123.51.123:4533: bind: can't assign requested address"
~/navidrome fix-scheduler-ctx-cancel [1] 

@isker
Copy link
Contributor Author

isker commented Mar 29, 2022

@deluan sorry for the ping, but I see you've been merging some things lately.

@deluan
Copy link
Member

deluan commented Mar 29, 2022

Yes, I'm going through all pending PRs and testing them first before merging. I'm planning to have a release with all these PRs soon. Don't worry, this one is on my list :)

@isker
Copy link
Contributor Author

isker commented Mar 29, 2022

Thanks!

@deluan
Copy link
Member

deluan commented Mar 30, 2022

Working great, thanks!

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navidrome does not die when services fail to bind to the configured IP address/port
2 participants