fix: correct minor formatting issues in CLI (#6813)

* fix: remove excess newlines from server startup

* Don't log benign closed pipe errors
This commit is contained in:
Ammar Bandukwala
2023-03-27 20:01:25 -05:00
committed by GitHub
parent 42b3d90221
commit 773580c7c9
2 changed files with 7 additions and 3 deletions

View File

@ -774,7 +774,11 @@ func (api *API) dialWorkspaceAgentTailnet(agentID uuid.UUID) (*codersdk.Workspac
go func() {
err := (*api.TailnetCoordinator.Load()).ServeClient(serverConn, uuid.New(), agentID)
if err != nil {
api.Logger.Warn(ctx, "tailnet coordinator client error", slog.Error(err))
// Sometimes, we get benign closed pipe errors when the server is
// shutting down.
if api.ctx.Err() == nil {
api.Logger.Warn(ctx, "tailnet coordinator client error", slog.Error(err))
}
_ = agentConn.Close()
}
}()