Skip to content

Commit

Permalink
[#100] Move retrieve_delivered_samples into deliver_sample
Browse files Browse the repository at this point in the history
  • Loading branch information
elfenpiff committed Feb 20, 2024
1 parent bb0110e commit 637e681
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iceoryx2/src/port/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ impl<Service: service::Service> DataSegment<Service> {
}

fn deliver_sample(&self, address_to_chunk: usize) -> usize {
self.retrieve_returned_samples();

let deliver_call = match self.config.unable_to_deliver_strategy {
UnableToDeliverStrategy::Block => {
<Service::Connection as ZeroCopyConnection>::Sender::blocking_send
Expand Down Expand Up @@ -371,7 +373,6 @@ impl<Service: service::Service> DataSegment<Service> {
fail!(from self, when self.update_connections(),
"{} since the connections could not be updated.", msg);

self.retrieve_returned_samples();
self.add_sample_to_history(address_to_chunk);
Ok(self.deliver_sample(address_to_chunk))
}
Expand Down

0 comments on commit 637e681

Please sign in to comment.