Skip to content

Commit

Permalink
#186 Treat non-zero time intervals correctly in Session::nextEvent
Browse files Browse the repository at this point in the history
Before this fix timer intervals less than 1 us was treated as a null-interval
which led to (almost) infinite waiting for bmqa::Session::nextEvent() to return
an event.

Signed-off-by: Stanislav Yuzvinsky <[email protected]>
  • Loading branch information
syuzvinsky authored Jan 23, 2024
1 parent d470857 commit b3ddcc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/groups/bmq/bmqa/bmqa_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ Event Session::nextEvent(const bsls::TimeInterval& timeout)
// If no timeout was specified, use a long timeout to simulate a 'no
// timeout' behavior
bsls::TimeInterval time = timeout;
if (time.totalMicroseconds() == 0) {
if (time == bsls::TimeInterval()) {
time.addDays(365);
}

Expand Down

0 comments on commit b3ddcc5

Please sign in to comment.