-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
More explicit error message if transport is already closed #35559
Conversation
We should make sure we didn't break child clients/shared transports (e.g. storage container -> blob client) |
API change check API changes are not detected in this pull request. |
Now in the case of |
To me, an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Unless our architects have concerns on the error type change.
We're passing the Storage tests, is that enough @johanste ? |
Fix #25640
We're not sure if we can auto-reopen the connection once it's closed, this can lead to leaky socket behavior. Therefore, this PR is just making explicit with a better error message that it's closed already.
Interesting thing is that if we call
close
while we never opened it, it shouldn't fail (it would be a bad breaking change), so the approach here is to track the open and the close event, for better acuracy.I take the opportunity of this PR to fix the typing cast, that was ironically hidding bug #25640 (mypy tried to tell me, but I didn't listen at the time :p)