Skip to content

Commit 43b345a

Browse files
committed
Fix a segfault when re-using wait set
1 parent 4956c31 commit 43b345a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rclrs/src/wait.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ impl WaitSet {
321321
/// This list is not comprehensive, since further errors may occur in the `rmw` or `rcl` layers.
322322
///
323323
/// [1]: std::time::Duration::ZERO
324-
pub fn wait(&mut self, timeout: Option<Duration>) -> Result<ReadyEntities, RclrsError> {
324+
pub fn wait(self, timeout: Option<Duration>) -> Result<ReadyEntities, RclrsError> {
325325
let timeout_ns = match timeout.map(|d| d.as_nanos()) {
326326
None => -1,
327327
Some(ns) if ns <= i64::MAX as u128 => ns as i64,

0 commit comments

Comments
 (0)