fix: log WARN on ErrConnectionClosed in tailnet.Controller.Run (#22293)

This commit is contained in:
Jon Ayers
2026-02-25 01:27:53 -06:00
committed by GitHub
parent 4f34452bcc
commit 43b8df86c1
+6
View File
@@ -7,6 +7,7 @@ import (
"io"
"maps"
"math"
"net"
"net/netip"
"slices"
"strings"
@@ -1433,6 +1434,11 @@ func (c *Controller) Run(ctx context.Context) {
return
}
if errors.Is(err, net.ErrClosed) {
c.logger.Warn(c.ctx, "control plane connection closed, retrying", slog.Error(err))
continue
}
// If the database is unreachable by the control plane, there's not much we can do, so we'll just retry later.
if errors.Is(err, codersdk.ErrDatabaseNotReachable) {
c.logger.Warn(c.ctx, "control plane lost connection to database, retrying",