GH-1321: Prevent compounding of connection_status_update event timers

Particularly for ICMP connections, a new timer got added every time a
`connection` record was updated even if there was still a pending timer
for that connection.
This commit is contained in:
Jon Siwek 2020-12-08 11:20:02 -08:00
parent 07c4662dc4
commit a35cd2a726
4 changed files with 20 additions and 0 deletions

View file

@ -322,6 +322,9 @@ void Connection::SetInactivityTimeout(double timeout)
void Connection::EnableStatusUpdateTimer()
{
if ( installed_status_timer )
return;
if ( connection_status_update && zeek::detail::connection_status_update_interval )
{
ADD_TIMER(&Connection::StatusUpdateTimer,