Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bfd3e7a

Browse files
committed
ensure dump is always called once
1 parent b6625aa commit bfd3e7a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tailnet/conn.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,8 @@ func (c *Conn) SetConnStatsCallback(maxPeriod time.Duration, maxConns int, dump
721721
_ = old.Shutdown(ctx)
722722
}
723723

724+
now := time.Now()
725+
dump(now, now.Add(time.Nanosecond), map[netlogtype.Connection]netlogtype.Counts{}, map[netlogtype.Connection]netlogtype.Counts{})
724726
c.tunDevice.SetStatistics(connStats)
725727
}
726728

0 commit comments

Comments
 (0)