derp/derphttp: add watch reconnection tests from #9719

Co-authored-by: Val <valerie@tailscale.com>
Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov
2023-10-25 21:41:24 +01:00
committed by Anton Tolchanov
parent 3d7fb6c21d
commit 3114a1c88d
2 changed files with 193 additions and 1 deletions

View File

@@ -14,6 +14,8 @@ import (
"tailscale.com/types/logger"
)
var retryInterval = 5 * time.Second
// RunWatchConnectionLoop loops until ctx is done, sending
// WatchConnectionChanges and subscribing to connection changes.
//
@@ -42,7 +44,6 @@ func (c *Client) RunWatchConnectionLoop(ctx context.Context, ignoreServerKey key
infoLogf = logger.Discard
}
logf := c.logf
const retryInterval = 5 * time.Second
const statusInterval = 10 * time.Second
var (
mu sync.Mutex