mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Don't handle messages that are not intended for us in spirc.
This prevents 2 active instances of librespot from effectively arguing over who the current active instance actually is. Without it events recurse.
This commit is contained in:
parent
98f1fe84dd
commit
2fa2bf86cb
1 changed files with 5 additions and 0 deletions
|
@ -872,6 +872,11 @@ impl SpircTask {
|
|||
);
|
||||
}
|
||||
|
||||
// Don't handle messages that are not intended for us.
|
||||
if !update.recipient.contains(device_id) {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
match update.typ() {
|
||||
MessageType::kMessageTypeHello => self.notify(Some(ident)),
|
||||
|
||||
|
|
Loading…
Reference in a new issue