transport: remove redundant check of stream state in Write (#1833)

This commit is contained in:
lyuxuan
2018-01-24 16:02:52 -08:00
committed by GitHub
parent c22018a9fb
commit 0848a0978e

View File

@ -843,10 +843,6 @@ func (t *http2Server) Write(s *Stream, hdr []byte, data []byte, opts *Options) e
var writeHeaderFrame bool
s.mu.Lock()
if s.state == streamDone {
s.mu.Unlock()
return streamErrorf(codes.Unknown, "the stream has been done")
}
if !s.headerOk {
writeHeaderFrame = true
}