fix(plugin): skip non-V4 notifications
This commit is contained in:
commit
c62bbe59a9
2 changed files with 14 additions and 0 deletions
|
|
@ -675,6 +675,11 @@ impl PluginProcess {
|
|||
}
|
||||
}
|
||||
|
||||
/// Whether this plugin process speaks the V4 protocol.
|
||||
pub fn is_v4(&self) -> bool {
|
||||
self.v4.is_some()
|
||||
}
|
||||
|
||||
/// Send a best-effort host-to-plugin notification. Requires V4; on V3
|
||||
/// processes this returns an error.
|
||||
pub fn notify_plugin(
|
||||
|
|
|
|||
|
|
@ -91,6 +91,15 @@ impl PluginManager {
|
|||
if !p.process.is_alive() {
|
||||
continue;
|
||||
}
|
||||
if !p.process.is_v4() {
|
||||
if crate::process::verbose() {
|
||||
eprintln!(
|
||||
"[plugin] skipping notification for {} (not V4)",
|
||||
p.process.id()
|
||||
);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if let Err(e) = p.process.notify_plugin(command_id, notification.clone()) {
|
||||
eprintln!(
|
||||
"[plugin] broadcast_notification failed for {}: {e}",
|
||||
|
|
|
|||
Loading…
Reference in a new issue