Skip to content
Snippets Groups Projects
Commit ed2d4f6a authored by CarlOlsson's avatar CarlOlsson Committed by Kabir Mohammed
Browse files

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

parent 3d271245
No related branches found
No related tags found
No related merge requests found
......@@ -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];
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment