Skip to content

Commit

Permalink
[humble] Recording stopped prints only once. (backport #1530) (#1535)
Browse files Browse the repository at this point in the history
* `Recording stopped` prints only once. (#1530)

Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
(cherry picked from commit 73b0772)

# Conflicts:
#	rosbag2_transport/src/rosbag2_transport/recorder.cpp

* Address merge conflicts

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>

---------

Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
Co-authored-by: Michael Orlov <michael.orlov@apex.ai>
  • Loading branch information
3 people authored Jan 13, 2024
1 parent a296fb5 commit 3f9016a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rosbag2_transport/src/rosbag2_transport/recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,11 @@ Recorder::~Recorder()
stop();
}


void Recorder::stop()
{
if (event_publisher_thread_should_exit_) {
return; // We are not in recording and therefore shall not do stop operation.
}
stop_discovery_ = true;
if (discovery_future_.valid()) {
auto status = discovery_future_.wait_for(2 * record_options_.topic_polling_interval);
Expand Down Expand Up @@ -146,6 +148,7 @@ void Recorder::stop()

void Recorder::record()
{
event_publisher_thread_should_exit_ = false;
stop_discovery_ = record_options_.is_discovery_disabled;
paused_ = record_options_.start_paused;
topic_qos_profile_overrides_ = record_options_.topic_qos_profile_overrides;
Expand Down

0 comments on commit 3f9016a

Please sign in to comment.