Skip to content

Commit

Permalink
Refs #7478. Protecting against spurious wakeup
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelCompany committed Feb 6, 2020
1 parent 97f068f commit 686f15a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cpp/rtps/messages/SendBuffersManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ std::unique_ptr<RTPSMessageGroup_t> SendBuffersManager::get_buffer(

std::unique_ptr<RTPSMessageGroup_t> ret_val;

if (pool_.empty())
while (pool_.empty())
{
if (allow_growing_ || n_created_ < pool_.capacity())
{
add_one_buffer(participant);
}
else
{
logInfo(RTPS_PARTICIPANT, "Waiting for send buffer");
available_cv_.wait(lock);
assert(!pool_.empty());
}
}

Expand Down

0 comments on commit 686f15a

Please sign in to comment.