mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[PR #182] [MERGED] bugfix: fix double unlock of mutex in dealer recvloop #243
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#243
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/devgianlu/go-librespot/pull/182
Author: @skeller
Created: 4/23/2025
Status: ✅ Merged
Merged: 4/23/2025
Merged by: @devgianlu
Base:
master← Head:fix_unlock📝 Commits (1)
cb077ccbugfix: fix double unlock of mutex in dealer recvloop📊 Changes
1 file changed (+5 additions, -4 deletions)
View changed files
📝
dealer/dealer.go(+5 -4)📄 Description
On error on backoff retry an error message is logged and the mutex unlocked. It is unlocked again outside the error handling and the loop is not stopped (if the unlock wouldn't panic). Fix this by correctly terminating the loop / cleaning up.
Fixes this:
librespot-go-1 | time="2025-04-21T05:15:11Z" level=error msg="failed reconnecting dealer" error="failed obtaining dealer access token: failed renewing login5 access token: failed authenticating with login5: UNKNOWN_ERROR"
librespot-go-1 | fatal error: sync: Unlock of unlocked RWMutex
librespot-go-1 |
librespot-go-1 | goroutine 20295860 [running]:
librespot-go-1 | sync.fatal({0xb0da65?, 0x2e28ae00000003?})
librespot-go-1 | /usr/lib/go/src/runtime/panic.go:1007 +0x20
librespot-go-1 | sync.(*RWMutex).Unlock(0x40002be858)
librespot-go-1 | /usr/lib/go/src/sync/rwmutex.go:208 +0x74
librespot-go-1 | github.com/devgianlu/go-librespot/dealer.(*Dealer).recvLoop(0x40002be7e0)
librespot-go-1 | /src/librespot/dealer/dealer.go:244 +0x66c
librespot-go-1 | created by github.com/devgianlu/go-librespot/dealer.(*Dealer).reconnect in goroutine 15025033
librespot-go-1 | /src/librespot/dealer/dealer.go:295 +0x158
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.