Message308376
Python's handling of socket has multiple issues, see #28134 for more fun. At the moment the values of type, family and protocol are unreliable at best and dangerously wrong at worst. The attributes are only correct if and only if the socket has not been created from a file descriptor and the socket hasn't been manipulated with ioctl or setsockopt().
Now to the issue at hand. I'm -1 on applying a mask to type. You can easily work around your problem by replacing "sock.type == SOCK_STREAM" with "sock.type & SOCK_STREAM == SOCK_STREAM". |
|
Date |
User |
Action |
Args |
2017-12-15 10:20:42 | christian.heimes | set | recipients:
+ christian.heimes, pitrou, vstinner, asvetlov, methane, yselivanov |
2017-12-15 10:20:42 | christian.heimes | set | messageid: <1513333242.7.0.213398074469.issue32331@psf.upfronthosting.co.za> |
2017-12-15 10:20:42 | christian.heimes | link | issue32331 messages |
2017-12-15 10:20:42 | christian.heimes | create | |
|