support multiple replays in the same session

This commit is contained in:
Martin Michelsen
2026-05-13 21:25:55 -07:00
parent 2e667bbe50
commit a6c25568ba
7 changed files with 68 additions and 40 deletions
+1 -5
View File
@@ -321,9 +321,8 @@ void ReplaySession::apply_default_mask(shared_ptr<Event> ev) {
}
}
ReplaySession::ReplaySession(shared_ptr<ServerState> state, FILE* input_log, bool is_interactive)
ReplaySession::ReplaySession(shared_ptr<ServerState> state, FILE* input_log)
: state(state),
is_interactive(is_interactive),
prev_psov2_crypt_enabled(this->state->use_psov2_rand_crypt),
commands_sent(0),
bytes_sent(0),
@@ -669,9 +668,6 @@ asio::awaitable<void> ReplaySession::run() {
replay_log.info_f("Replay complete: {} commands sent ({} bytes), {} commands received ({} bytes)",
this->commands_sent, this->bytes_sent, this->commands_received, this->bytes_received);
}
if (!this->is_interactive) {
this->state->io_context->stop();
}
}
void ReplaySession::reschedule_idle_timeout() {