mirror of
https://github.com/librespot-org/librespot.git
synced 2024-12-18 17:11:53 +00:00
Ignore messages from unknown channels.
It occasionally happens that messages on a channel are received before the subscription confirmation, which would cause a panic when looking for the subscription. Changed to simply ignore those.
This commit is contained in:
parent
cf57274f9c
commit
5464647164
1 changed files with 2 additions and 2 deletions
|
@ -147,8 +147,8 @@ impl MercuryManager {
|
||||||
MercuryCallback::Subscription(tx) => self.complete_subscription(response, tx),
|
MercuryCallback::Subscription(tx) => self.complete_subscription(response, tx),
|
||||||
MercuryCallback::Channel => {
|
MercuryCallback::Channel => {
|
||||||
self.subscriptions
|
self.subscriptions
|
||||||
.get(header.get_uri()).unwrap()
|
.get(header.get_uri())
|
||||||
.send(response).unwrap()
|
.map(|tx| tx.send(response).unwrap());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue