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.
@@ -147,8 +147,8 @@ impl MercuryManager {
MercuryCallback::Subscription(tx) => self.complete_subscription(response, tx),
MercuryCallback::Channel => {
self.subscriptions
- .get(header.get_uri()).unwrap()
- .send(response).unwrap()
+ .get(header.get_uri())
+ .map(|tx| tx.send(response).unwrap());
}