Skip to content

Commit

Permalink
Publisher: fix inconsistent duplicated timestamp for Local vs. Remote…
Browse files Browse the repository at this point in the history
… Subscribers (#580)
  • Loading branch information
juanjole authored Nov 7, 2023
1 parent b2959f0 commit a2cf2bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zenoh/src/publication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,7 @@ impl SyncResolve for Publication<'_> {
.as_ref()
.unwrap()
.clone();
let timestamp = publisher.session.runtime.new_timestamp();

if publisher.destination != Locality::SessionLocal {
primitives.send_push(Push {
Expand All @@ -439,7 +440,7 @@ impl SyncResolve for Publication<'_> {
ext_tstamp: None,
ext_nodeid: ext::NodeIdType::default(),
payload: PushBody::Put(Put {
timestamp: publisher.session.runtime.new_timestamp(),
timestamp,
encoding: value.encoding.clone(),
ext_sinfo: None,
#[cfg(feature = "shared-memory")]
Expand All @@ -453,7 +454,7 @@ impl SyncResolve for Publication<'_> {
let data_info = DataInfo {
kind,
encoding: Some(value.encoding),
timestamp: publisher.session.runtime.new_timestamp(),
timestamp,
..Default::default()
};
publisher.session.handle_data(
Expand Down

0 comments on commit a2cf2bf

Please sign in to comment.