Skip to content

Commit

Permalink
make sure live data never becomes stale
Browse files Browse the repository at this point in the history
  • Loading branch information
amokfa committed Nov 28, 2024
1 parent 52d0d9a commit dccc109
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uplink/src/base/serializer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ impl<C: MqttClient> Serializer<C> {

/// Returns None if nothing is left (time to move to normal mode)
/// Prioritize live data over saved data
/// Prioritize both live data and saved data based on stream priorities
/// Prioritize old live data over new live data, to ensure live data for all the streams is pushed
fn fetch_next_packet_from_storage(&mut self) -> Option<(Publish, Arc<StreamConfig>)> {
if let Some((sk, (_, live_data, _))) = self.sorted_storages.iter_mut()
.filter(|(_, (_, live_data, _))| live_data.is_some())
Expand Down

0 comments on commit dccc109

Please sign in to comment.