Message297463
I think fixing all affected calls to socket.close in the world (option 3) would be too much. I just added two new reports (Issue 30652 and Issue 30391) as dependencies. These are about testing socketserver.TCPServer. As an example, to fix the socket.close call there, I think the change would look like
class TCPServer:
def close_request(self, request):
try:
request.close()
except ConnectionError:
# Suppress asynchronous errors such as ECONNRESET on Free BSD
pass
Instead of that change all over the place, I am thinking option 2 would be safest. In Modules/socketmodule.c, something like
sock_close(PySocketSockObject *s)
{
Py_BEGIN_ALLOW_THREADS
res = SOCKETCLOSE(fd);
Py_END_ALLOW_THREADS
/* ECONNRESET can occur on Free BSD */
if (res < 0 && errno != ECONNRESET) {
return s->errorhandler();
}
} |
|
Date |
User |
Action |
Args |
2017-07-01 01:18:42 | martin.panter | set | recipients:
+ martin.panter, janssen, vstinner, christian.heimes, alex, dstufft |
2017-07-01 01:18:42 | martin.panter | set | messageid: <1498871922.08.0.88218757917.issue30319@psf.upfronthosting.co.za> |
2017-07-01 01:18:42 | martin.panter | link | issue30319 messages |
2017-07-01 01:18:41 | martin.panter | create | |
|