Skip to content

Commit

Permalink
Use PlayerClock::wakeup() in rosbag2_transport::Player
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Bedard <[email protected]>
  • Loading branch information
christophebedard committed Nov 25, 2024
1 parent ccc4fa1 commit 6caf965
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rosbag2_transport/src/rosbag2_transport/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,8 @@ void PlayerImpl::stop()
}

if (clock_->is_paused()) {
clock_->resume(); // Temporary resume clock to force wakeup in clock_->sleep_until(time)
clock_->pause(); // Return in pause mode to preserve original state of the player
// Wake up the clock in case it's in a sleep_until(time) call
clock_->wakeup();
}
// Note: Don't clean up message queue here. It will be cleaned up automatically in
// playback thread after finishing play_messages_from_queue();
Expand Down

0 comments on commit 6caf965

Please sign in to comment.