-
Notifications
You must be signed in to change notification settings - Fork 37
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
Ignore socket failure to close during del #379
Conversation
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.
Looks fine to me, although there is one detail I'd like to mention:
The commit here seems to have been made under a different git account ([email protected]
, instead of the annonymous github assigned email you usually commit under: [email protected]
). I assume you accidentally used your work email here, which has then also lead to the commit getting an "Unverified" status on github, since this git email doesn't seem to be associated with a registered github user.
This isn't at all an issue that would prevent merging, however you might want to force-push and fix this. If you're fine with there being an unverified commit from this git account in the repo though, you can simply merge it, as functionality-wise it looks good.
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.
Maybe move this try-ecept to close
method instead of __del__
?
I thought of that too, but I'm a believer of not silently suppressing errors, if the user called close explicitly, they should see it if the socket was closed already and if they're interested in suppressing that failure, they can handle it themselves in their try-except. This does make sense in |
Better would be at least document this error in |
0a6f166
to
dcdaa5f
Compare
I suspect that these errors won't happen under normal circumstances. Closing a socket ought to work. It is only during garbage collection calling |
https://discord.com/channels/936788458939224094/938591600160956446/1010780929154875532