Skip to content

Commit

Permalink
Refs #21279: Update return write call
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
  • Loading branch information
JesusPoderoso committed Jul 15, 2024
1 parent 780647f commit 4945c8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/cpp/static_edp_discovery/PublisherApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void PublisherApp::run()

bool PublisherApp::publish()
{
bool ret = false;
ReturnCode_t ret = RETCODE_ERROR;
// Wait for the data endpoints discovery
std::unique_lock<std::mutex> matched_lock(mutex_);
cv_.wait(matched_lock, [&]()
Expand All @@ -188,7 +188,7 @@ bool PublisherApp::publish()
hello_.index(hello_.index() + 1);
ret = writer_->write(&hello_);
}
return ret;
return (ret == RETCODE_OK);
}

bool PublisherApp::is_stopped()
Expand Down

0 comments on commit 4945c8c

Please sign in to comment.