Subject: Orderly close (was Re: tcp rsts, data truncation, and the future of public reset)

From: Martin Thomson <[email-masked]>
Date: Thu, 23 Feb 2017 11:20:28 +1100

On 23 February 2017 at 11:01, Lubashev, Igor <[email-masked]> wrote:
> It seems that an orderly termination of a connection should look like:
> 1. GOAWAY
> 2. Reset all incoming streams
> 3. Finish writing all streams, including the FIN.
> 4. Wait for all ACKs (and retransmit as needed)
> 5. CONNECTION_CLOSE

On step 2, GOAWAY creates an implicit reset for all streams higher
than the indicated number.  You don't need to reset any streams with
higher numbered identifiers.

On step 3, you need to handle all streams up to the GOAWAY value by
either sending a FIN OR by sending a reset.  You are definitely right
that you need to wait for those to be acknowledged in step 4.

Would it be useful to include a short section on shutdown that covered
these nuances?

---

From: Mike Bishop <[email-masked]>
Date: Thu, 23 Feb 2017 00:28:35 +0000

I think so, yes.  And we'll need to discuss what happens when things happen "early" in the unclean case.

-----Original Message-----
From: QUIC [mailto:[email-masked]] On Behalf Of Martin Thomson
Sent: Wednesday, February 22, 2017 4:20 PM
To: Lubashev, Igor <[email-masked]>
Cc: Mike Bishop <[email-masked]>; [email-masked]; Ryan Hamilton <[email-masked]>; Patrick McManus <[email-masked]>; [email-masked]; [email-masked]; Martin Duke <[email-masked]>
Subject: Orderly close (was Re: tcp rsts, data truncation, and the future of public reset)

On 23 February 2017 at 11:01, Lubashev, Igor <[email-masked]> wrote:
> 4. Wait for all ACKs (and retransmit as needed) 5. CONNECTION_CLOSE

On step 2, GOAWAY creates an implicit reset for all streams higher than the indicated number.  You don't need to reset any streams with higher numbered identifiers.

On step 3, you need to handle all streams up to the GOAWAY value by either sending a FIN OR by sending a reset.  You are definitely right that you need to wait for those to be acknowledged in step 4.

Would it be useful to include a short section on shutdown that covered these nuances?