Skip to content

Commit

Permalink
Fixed issue bluemurder#9 - Timeout on last Ping corrupts AvgResponseTime
Browse files Browse the repository at this point in the history
  • Loading branch information
bhelterline committed Jul 9, 2020
1 parent ce0be29 commit 15c665c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Pinger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,11 @@ void Pinger::RequestTimeoutOccurred()
m_pingResponse.MinResponseTime = 0;
m_pingResponse.MaxResponseTime = 0;
}
else
{
// Evaluate average response time
m_pingResponse.AvgResponseTime /= m_pingResponse.TotalReceivedResponses;
}

// Call the end ping requests callback if defined
if(m_onEnd != nullptr)
Expand Down

0 comments on commit 15c665c

Please sign in to comment.