mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix: log WARN on ErrConnectionClosed in tailnet.Controller.Run (#22293)
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user