-
Notifications
You must be signed in to change notification settings - Fork 177
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not trigger transport error in case of SHM buffer invalidation (#1245
) * Do not trigger transport error in case of SHM buffer invalidation * Fix spelling * Drop the whole ZBuf in case of SHM error!
- Loading branch information
1 parent
8529eb6
commit c726e13
Showing
4 changed files
with
19 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,8 @@ | |
// Contributors: | ||
// ZettaScale Zenoh Team, <[email protected]> | ||
// | ||
#[cfg(feature = "shared-memory")] | ||
use tracing::error; | ||
use zenoh_buffers::{ | ||
reader::{HasReader, Reader}, | ||
ZSlice, | ||
|
@@ -37,7 +39,10 @@ impl TransportUnicastLowlatency { | |
#[cfg(feature = "shared-memory")] | ||
{ | ||
if self.config.shm.is_some() { | ||
crate::shm::map_zmsg_to_shmbuf(&mut msg, &self.manager.shmr)?; | ||
if let Err(e) = crate::shm::map_zmsg_to_shmbuf(&mut msg, &self.manager.shmr) { | ||
error!("Error receiving SHM buffer: {e}"); | ||
return Ok(()); | ||
} | ||
} | ||
} | ||
callback.handle_message(msg) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters