Subject: [quicwg/base-drafts] Transition to half closed local should probably happen on FIN ack (#571)

From: Subodh Iyengar <[email-masked]>
Date: Sun, 04 Jun 2017 00:01:59 -0700

in 10.2.2. 
" An endpoint sending an FIN flag causes the stream state to become “half-closed (local)”. An endpoint receiving a FIN flag causes the stream state to become “half-closed (remote)” once all preceding data has arrived"

this seems to suggest that a sender will transition to half closed immediately after sending a FIN. Is that intentional? 

It seems that it would be better for the sender to transition to FIN only after getting the ACK otherwise you'd get into a case where:

Sender sends FIN -> transitions to half closed local
Receiver races with a RST -> sender has sent the FIN, so doesn't send a RST stream is response
Sender transitions to closed
FIN gets lost

However now that the sender is in closed it might still have to retransmit the FIN. Making the sender wait on FIN ack to transition to half closed local seems better, that way if the FIN is not ACKed, the sender could just go into half closed remote like normal when it gets the RST.

I like the idea of closed state being a terminal state where no additional work is needed from the sender.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/571

---

From: Martin Thomson <[email-masked]>
Date: Mon, 05 Jun 2017 02:01:44 -0700

This is just an inconsistency.  The text already says that streams close when you have no more to send (or no more to receive), with emphasis:

> A stream transitions from this state to “closed” when a STREAM frame that contains a FIN flag is received **and all prior data has arrived**, or when a RST_STREAM frame is received.

We should try to be more explicit.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/571#issuecomment-306139149

---

From: janaiyengar <[email-masked]>
Date: Tue, 13 Jun 2017 04:05:35 -0700

The *stream* doesn't need to wait for the FIN to be acked. It's a reliable frame, so the connection will ensure that the FIN bit gets retransmitted, but I think the stream should close in the case you mention. The stream state machine does not include reliability states (it does not include acking of any data).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/571#issuecomment-308082446

---

From: MikkelFJ <[email-masked]>
Date: Tue, 13 Jun 2017 04:15:59 -0700

> The stream doesn't need to wait for the FIN to be acked. It's a reliable frame

Does this consider state complexity as a function of races with RST?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/571#issuecomment-308084523