1 parent c3358bc commit dd8df1dCopy full SHA for dd8df1d
1 file changed
internal/ingestsmux/server.go
@@ -172,10 +172,9 @@ func (s *Server) handleStream(stream *smux.Stream) error {
172
_ = stream.Close()
173
return fmt.Errorf("write ingest smux ack: %w", err)
174
}
175
- if err := stream.CloseWrite(); err != nil {
176
- _ = stream.Close()
177
- return fmt.Errorf("close ingest smux write side: %w", err)
178
- }
+ // The client closes the stream after reading the ack. Closing the server
+ // write side immediately can race smux stream cleanup against that read for
+ // unknown-length bodies, where the client already half-closed its writer.
179
return nil
180
181
0 commit comments