Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuicTransportBase.stop() in 'failed' state #28

Closed
shampson opened this issue Jan 4, 2019 · 2 comments · Fixed by #88
Closed

QuicTransportBase.stop() in 'failed' state #28

shampson opened this issue Jan 4, 2019 · 2 comments · Fixed by #88
Assignees

Comments

@shampson
Copy link

shampson commented Jan 4, 2019

If the QuicTransport is in the 'failed' state the transport is essentially closed, but when you call stop() it still sets the transport's state to closed and starts the closing procedure. I think step 2. needs to be changed to:

2. If transport's [[QuicTransportState]] is "closed" or "failed" then abort these steps.

@amithilbuch
Copy link

amithilbuch commented Jan 4, 2019

User's code (or understanding) should be geared towards the higher level abstraction.
I would recommend sticking with a disposable pattern where the user:

  1. creates object
  2. uses object
  3. disposes (closes) object

regardless of what transpires, the user should still be disposing of the object when it is done.
The current details that a failed connection is unrecoverable and optimization around freeing resources when that happens, should not impact this pattern.
In this case, i would say close() should transition the object state from failed to closed.

@shampson
Copy link
Author

@amithilbuch Currently the spec doesn't say anything about freeing resources.

Changing the state to "closed" sounds good to me. If the transport is in the "failed" state it can't send any more CONNECTION_CLOSE frames, so I think these steps should be skipped in this case:

An endpoint that receives a CONNECTION_CLOSE frame
MAY send a single packet containing a CONNECTION_CLOSE frame before
entering the draining state, using a CONNECTION_CLOSE frame and a
NO_ERROR code if appropriate. An endpoint MUST NOT send further
packets, which could result in a constant exchange of
CONNECTION_CLOSE frames until the closing period on either peer
ended.

https://tools.ietf.org/html/draft-ietf-quic-transport-19#section-10.3

@shampson shampson self-assigned this Mar 19, 2019
@dontcallmedom dontcallmedom transferred this issue from w3c/p2p-webtransport Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants