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

Context canceled error returned instead of ErrClosed #137

Open
dmcgowan opened this issue Mar 30, 2023 · 1 comment
Open

Context canceled error returned instead of ErrClosed #137

dmcgowan opened this issue Mar 30, 2023 · 1 comment

Comments

@dmcgowan
Copy link
Member

A flaky test was observed in containerd in the 1.1 branch after updating to 1.1.1

=== Failed
=== FAIL: . TestClientTTRPC_Close (0.00s)
    client_ttrpc_test.go:85: assertion failed: context canceled (err *errors.errorString) != ttrpc: closed (ttrpc.ErrClosed *errors.errorString)

@austinvazquez
Copy link
Contributor

@dmcgowan, I believe I made some progress on this one. There is a race condition where the client's error can be set by the client's server response goroutine which was setting the error to c.ctx.Err(). This will always be context.Cancelled and can either be set to ErrClosed or return and allow the client.Close function to always set the error here. Interested in your feedback.

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

2 participants