Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replay: fix issue when original logfile had topics with zero timstamps #11708

Merged
merged 1 commit into from
Mar 25, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/modules/replay/replay_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ void Replay::run()
//to be in chronological order, so we need to check all subscriptions
uint64_t next_file_time = 0;
int next_msg_id = -1;
bool first_time = true;

for (size_t i = 0; i < _subscriptions.size(); ++i) {
const Subscription *subscription = _subscriptions[i];
Expand All @@ -782,7 +783,8 @@ void Replay::run()
}

if (subscription->orb_meta && !subscription->ignored) {
if (next_file_time == 0 || subscription->next_timestamp < next_file_time) {
if (first_time || subscription->next_timestamp < next_file_time) {
first_time = false;
next_msg_id = (int)i;
next_file_time = subscription->next_timestamp;
}
Expand Down