Message309224
os.close(fd) of a socket fd does not work some platforms, e.g. Windows. In the past we have used socket.socket(fileno=fd).close() to close a socket in a platform independent way. With #28134 it may no longer work in all cases, most noticeable when the socket has neither been connected nor bound yet and auto-detection of type and family is used.
Instead of adding more hacks, I propose to add a socket.close(fd) function as cross-platform way to close a socket fd. It won't be the first function that mimics an o' module function. The socket module already has the undocumented socket.dup(fd) function. |
|
Date |
User |
Action |
Args |
2017-12-30 09:37:23 | christian.heimes | set | recipients:
+ christian.heimes |
2017-12-30 09:37:23 | christian.heimes | set | messageid: <1514626643.82.0.213398074469.issue32454@psf.upfronthosting.co.za> |
2017-12-30 09:37:23 | christian.heimes | link | issue32454 messages |
2017-12-30 09:37:23 | christian.heimes | create | |
|