Skip to content

Commit

Permalink
send FIN in normal order instead of in priority
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Aug 31, 2024
1 parent d245826 commit f4519fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,9 @@ func (s *Stream) Close() error {
})

if once {
_, err = s.sess.writeFrame(newFrame(byte(s.sess.config.Version), cmdFIN, s.id))
// send FIN in order
f := newFrame(byte(s.sess.config.Version), cmdFIN, s.id)
_, err = s.sess.writeFrameInternal(f, time.After(openCloseTimeout), CLSDATA)
s.sess.streamClosed(s.id)
return err
} else {
Expand Down

0 comments on commit f4519fc

Please sign in to comment.