Skip to content

Commit 3db4320

Browse files
committed
doc: recover the comment in closeStream
1 parent 115b8b6 commit 3db4320

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

internal/transport/http2_client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,9 @@ func (t *http2Client) closeStream(s *ClientStream, err error, rst bool, rstCode
944944
<-s.done
945945
return
946946
}
947-
947+
// status and trailers can be updated here without any synchronization because the stream goroutine will
948+
// only read it after it sees an io.EOF error from read or write and we'll write those errors
949+
// only after updating this.
948950
s.status = st
949951
if len(mdata) > 0 {
950952
s.trailer = mdata

0 commit comments

Comments
 (0)