Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
Fix: Only send not empty notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeling committed Oct 24, 2023
1 parent 62d213a commit 541c32a
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions kuksa_databroker/databroker/src/broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,9 +706,13 @@ impl ChangeSubscription {
}
notifications
};
match self.sender.send(notifications).await {
Ok(()) => Ok(()),
Err(_) => Err(NotificationError {}),
if !notifications.updates.is_empty() {
match self.sender.send(notifications).await {
Ok(()) => Ok(()),
Err(_) => Err(NotificationError {}),
}
} else {
Ok(())
}
} else {
Ok(())
Expand Down

0 comments on commit 541c32a

Please sign in to comment.