Fixed missing generation estimator reset within the packet decoder

This commit is contained in:
WolverinDEV 2021-04-19 19:11:43 +02:00
parent 7a7a24ee2c
commit 444dea13c5

View File

@ -28,9 +28,18 @@ PacketDecoder::~PacketDecoder() {
}
void PacketDecoder::reset() {
std::lock_guard buffer_lock(this->packet_buffer_lock);
for(auto& buffer : this->_command_fragment_buffers) {
buffer.reset();
{
std::lock_guard buffer_lock(this->packet_buffer_lock);
for(auto& buffer : this->_command_fragment_buffers) {
buffer.reset();
}
}
{
std::lock_guard estimator_lock{this->incoming_generation_estimator_lock};
for(auto& estimator : this->incoming_generation_estimators) {
estimator.reset();
}
}
}