GH-88968: Reject socket that is already used as a transport by gvanrossum · Pull Request #98010 · python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Conversation
I think SSL socket and datagram have the same issue though I haven't verified this. Perhaps also add this check to _make_datagram_transport and _make_ssl_transport?
Done.
I worried a bit about how thoughly to test this, but then realized that this code is tested every time a transport is created using one of these functions -- even if the user didn't pass sock=..., since it is called if the socket was created by the higher-level code (e.g. create_connection) too.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I think news can be skipped as the change is very small, leaving up to you to decide.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters