derp: remove stats goroutine, use a timer

Without changing behaviour, don't create a goroutine per connection that
sits and sleeps, but rather use a timer that wakes up and gathers
statistics on a regular basis.

Fixes #12127

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: Ibc486447e403070bdc3c2cd8ae340e7d02854f21
This commit is contained in:
Andrew Dunham
2024-05-14 12:28:01 -04:00
parent 7ef2f72135
commit c6d42b1093
3 changed files with 28 additions and 23 deletions
+3 -2
View File
@@ -7,6 +7,7 @@ package derp
import "context"
func (c *sclient) statsLoop(ctx context.Context) error {
return nil
func (c *sclient) startStatsLoop(ctx context.Context) {
// Nothing to do
return
}