mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 15:00:34 +01:00
grpc: Do not print wildcard notifications that don't have a handler
Changelog-Fixed: grpc: We no longer log a warning if a notification does not have a handler
This commit is contained in:
parent
46fde419b1
commit
7b18030ee2
1 changed files with 6 additions and 3 deletions
|
@ -138,9 +138,12 @@ async fn handle_notification(plugin: Plugin<PluginState>, value: serde_json::Val
|
|||
log::debug!("Failed to parse notification from lightningd {:?}", err);
|
||||
}
|
||||
Ok(notification) => {
|
||||
if let Err(err) = plugin.state().events.send(notification) {
|
||||
log::warn!("Failed to broadcast notification {:?}", err)
|
||||
}
|
||||
/* Depending on whether or not there is a wildcard
|
||||
* subscription we may receive notifications for which we
|
||||
* don't have a handler. We suppress the `SendError` which
|
||||
* would indicate there is no subscriber for the given
|
||||
* topic. */
|
||||
let _ = plugin.state().events.send(notification);
|
||||
}
|
||||
};
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Reference in a new issue