Skip to content

Commit 2f26fc7

Browse files
committed
fix: stop logging session shutdown as warning
1 parent 0a8c8ce commit 2f26fc7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/workspaceagentsrpc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"database/sql"
66
"fmt"
7+
"io"
78
"net/http"
89
"runtime/pprof"
910
"sync"
@@ -156,7 +157,7 @@ func (api *API) workspaceAgentRPC(rw http.ResponseWriter, r *http.Request) {
156157
ctx = tailnet.WithStreamID(ctx, streamID)
157158
ctx = agentapi.WithAPIVersion(ctx, version)
158159
err = agentAPI.Serve(ctx, mux)
159-
if err != nil {
160+
if err != nil && !xerrors.Is(err, yamux.ErrSessionShutdown) && !xerrors.Is(err, io.EOF) {
160161
logger.Warn(ctx, "workspace agent RPC listen error", slog.Error(err))
161162
_ = conn.Close(websocket.StatusInternalError, err.Error())
162163
return

0 commit comments

Comments
 (0)