Message308409
> You can easily work around your problem by replacing "sock.type == SOCK_STREAM" with "sock.type & SOCK_STREAM == SOCK_STREAM".
Heh :) No, that would be a buggy code. Try this on your Linux box:
(socket.SOCK_SEQPACKET & socket.SOCK_STREAM) == socket.SOCK_STREAM
The _only_ way of checking socket type reliably is to explicitly reset SOCK_NONBLOCK and SOCK_CLOEXEC or to apply 0xF mask on Linux, and don't do that on other platforms.
That's why I think it's important to fix this one way or another. |
|
Date |
User |
Action |
Args |
2017-12-15 16:32:58 | yselivanov | set | recipients:
+ yselivanov, pitrou, vstinner, christian.heimes, asvetlov, methane |
2017-12-15 16:32:58 | yselivanov | set | messageid: <1513355578.27.0.213398074469.issue32331@psf.upfronthosting.co.za> |
2017-12-15 16:32:58 | yselivanov | link | issue32331 messages |
2017-12-15 16:32:58 | yselivanov | create | |
|