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

Corrupt stream after expired WriteDeadline #51

Open
ltucker opened this issue Jun 26, 2019 · 0 comments
Open

Corrupt stream after expired WriteDeadline #51

ltucker opened this issue Jun 26, 2019 · 0 comments

Comments

@ltucker
Copy link

ltucker commented Jun 26, 2019

If you set a write deadline and it expires, Write may return an incorrect number of bytes written (It always returns 0 although some may have actually succeeded anyway since the write goes on a request queue for the sendLoop). This effectively corrupts the stream from the client perspective.

Here is an echo test that demonstrates: https://gist.github.com/ltucker/e63cdd323ed8480d606d809467f45f93
And a branch with the test here:
https://github.com/ltucker/smux/tree/bigwritedeadline

This may be expected behavior? (eg tls.Conn is considered corrupt after a write deadline expires) -- it's not documented as such, so I expected this to work.

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

No branches or pull requests

1 participant