-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop the whole ZBuf in case of SHM error!
- Loading branch information
1 parent
0c998d2
commit 839ffe3
Showing
4 changed files
with
23 additions
and
15 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