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

Determine Stream drop behavior #152

Closed
camshaft opened this issue Oct 14, 2020 · 2 comments
Closed

Determine Stream drop behavior #152

camshaft opened this issue Oct 14, 2020 · 2 comments
Labels

Comments

@camshaft
Copy link
Contributor

From comment: #129 (comment)

Matthias247

Btw: I learned that Quinn implements dropping a stream as closing it instead of resetting it. That seems like an option to get around the UNKNOWN issue. However I am not sure if I prefer it, since it seems like it could close the stream even if not all expected data is sent.

camshaft

Yeah I could go either way on it. I think if we want to be close to what TCP streams do in Rust it would probably be better to finish it rather than reset.

From https://doc.rust-lang.org/std/net/struct.TcpStream.html

The connection will be closed when the value is dropped. The reading and writing portions of the connection can also be shut down individually with the shutdown method.

From tokio-rs/tokio-io#73 (comment)

the intention of shutdown was for things like "shut down the TLS connection" or "flush remaining buffers and then shut down the underlying socket" or things like that, the name shutdown wasn't intended to convey a literal TCP shutdown and was a mistake on our part.

@Matthias247
Copy link
Contributor

I'm basically OK either way as long as it's documented.

However I agree that it could make sense to do what the other implementations do and prefer a close over a reset

@camshaft camshaft added the design label Nov 2, 2020
@camshaft
Copy link
Contributor Author

Streams are finished on drop without error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants