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:
JasonLG1979 2023-06-26 15:43:21 -05:00
parent 98f1fe84dd
commit 2fa2bf86cb

View file

@ -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)),