Skip to content

Commit

Permalink
fix: stop logging session shutdown as warning (#12922)
Browse files Browse the repository at this point in the history
A customer hit like 200k of ErrSessionShutdown, which just dupes any errors we would have generated when shutting down the session for e.g. Ping failures.
  • Loading branch information
spikecurtis committed Apr 10, 2024
1 parent 0a8c8ce commit 5469011
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coderd/workspaceagentsrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"database/sql"
"fmt"
"io"
"net/http"
"runtime/pprof"
"sync"
Expand Down Expand Up @@ -156,7 +157,7 @@ func (api *API) workspaceAgentRPC(rw http.ResponseWriter, r *http.Request) {
ctx = tailnet.WithStreamID(ctx, streamID)
ctx = agentapi.WithAPIVersion(ctx, version)
err = agentAPI.Serve(ctx, mux)
if err != nil {
if err != nil && !xerrors.Is(err, yamux.ErrSessionShutdown) && !xerrors.Is(err, io.EOF) {
logger.Warn(ctx, "workspace agent RPC listen error", slog.Error(err))
_ = conn.Close(websocket.StatusInternalError, err.Error())
return
Expand Down

0 comments on commit 5469011

Please sign in to comment.