diff --git a/coderd/x/chatd/stream_parts_transport.go b/coderd/x/chatd/stream_parts_transport.go index 461a950f6b..04544cf741 100644 --- a/coderd/x/chatd/stream_parts_transport.go +++ b/coderd/x/chatd/stream_parts_transport.go @@ -214,6 +214,9 @@ func (s *streamPartsTransportSession) Close() error { s.closeOnce.Do(func() { s.cancel() s.closeErr = s.transport.Close() + if streamPartsExpectedTransportClose(s.closeErr) { + s.closeErr = nil + } }) return s.closeErr }