Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent duplicated timestamp in Publication #580

Merged
merged 7 commits into from
Nov 7, 2023
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
Loading