Skip to content

Commit

Permalink
Refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmittag committed Apr 12, 2024
1 parent 942bbf0 commit 0fd6633
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions databroker/src/broker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ impl Subscriptions {
match &sub.permissions.expired() {
Ok(()) => true,
Err(PermissionError::Expired) => {
sub.sender = None;
info!("Token expired: removing subscription");
false
}
Err(err) => panic!("Error: {:?}", err),
Expand Down Expand Up @@ -705,7 +705,6 @@ impl ChangeSubscription {
// notify
let notifications = {
let mut notifications = EntryUpdates::default();
let mut error = None;
for (id, changed_fields) in changed {
if let Some(fields) = self.entries.get(id) {
if !fields.is_disjoint(changed_fields) {
Expand Down Expand Up @@ -737,8 +736,7 @@ impl ChangeSubscription {
}
Err(ReadError::PermissionExpired) => {
debug!("notify: token expired, closing subscription channel");
error = Some(NotificationError {});
break;
return Err(NotificationError {})
}
Err(_) => {
debug!("notify: could not find entry with id {}", id);
Expand All @@ -747,9 +745,6 @@ impl ChangeSubscription {
}
}
}
if let Some(err) = error {
return Err(err);
}
notifications
};
if notifications.updates.is_empty() {
Expand Down

0 comments on commit 0fd6633

Please sign in to comment.