Skip to content

Commit e8a8fb6

Browse files
committed
Don't log benign closed pipe errors
1 parent 9bdd8e5 commit e8a8fb6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

coderd/workspaceagents.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,11 @@ func (api *API) dialWorkspaceAgentTailnet(agentID uuid.UUID) (*codersdk.Workspac
774774
go func() {
775775
err := (*api.TailnetCoordinator.Load()).ServeClient(serverConn, uuid.New(), agentID)
776776
if err != nil {
777-
api.Logger.Warn(ctx, "tailnet coordinator client error", slog.Error(err))
777+
// Sometimes, we get benign closed pipe errors when the server is
778+
// shutting down.
779+
if api.ctx.Err() == nil {
780+
api.Logger.Warn(ctx, "tailnet coordinator client error", slog.Error(err))
781+
}
778782
_ = agentConn.Close()
779783
}
780784
}()

0 commit comments

Comments
 (0)