-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
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 errors when unjoining multiple Sonos devices simultaneously #73133
Fix errors when unjoining multiple Sonos devices simultaneously #73133
Conversation
Hey there @cgtobi, mind taking a look at this pull request as it has been labeled with an integration ( |
self.speaker.join(speakers) | ||
|
||
def unjoin_player(self): | ||
async with self.hass.data[DATA_SONOS].topology_condition: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you write lock
in description but use a condition here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to keep the description simple as the way it's used here should effectively act like a simple lock. Am I missing an angle on why it shouldn't be used in this manner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was just checking!
20dfaf2
to
93142c3
Compare
Proposed change
This wraps the
media_player.join
and.unjoin
service calls in an async lock to avoid potential races during grouping operations.Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: