Skip to content

Commit

Permalink
upstream/doq: send STREAM FIN after query is sent
Browse files Browse the repository at this point in the history
fixed #720
  • Loading branch information
IrineSistiana committed Sep 23, 2023
1 parent 1bb45d2 commit 71339ed
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/upstream/doq/upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,14 @@ func (u *Upstream) exchange(s quic.Stream, payload []byte) (*dns.Msg, error) {
return nil, err
}

// RFC 9250 4.2
// The client MUST send the DNS query over the selected stream and MUST
// indicate through the STREAM FIN mechanism that no further data will
// be sent on that stream.
//
// Call Close() here will send the STREAM FIN. It won't close Read.
s.Close()

resp, _, err := dnsutils.ReadMsgFromTCP(s)
if err != nil {
return nil, err
Expand Down

0 comments on commit 71339ed

Please sign in to comment.