New submission from Daniel Engel :
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit
(AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.18.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: import socket
...: s1, s2 = socket.socketpair()
...: import asyncio
...: async def test():
...: r1, w1 = await asyncio.open_connection(sock=s1)
...: r2, w2 = await asyncio.open_connection(sock=s2)
...: s1.close()
...: asyncio.run(test())
Exception in callback
_ProactorBasePipeTransport._call_connection_lost(ConnectionAbo...e, 1236, None))
handle:
Traceback (most recent call last):
File "c:\python39\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "c:\python39\lib\asyncio\proactor_events.py", line 162, in
_call_connection_lost
self._sock.shutdown(socket.SHUT_RDWR)
OSError: [WinError 10038] An operation was attempted on something that is not a
socket
--
components: asyncio
messages: 387228
nosy: asvetlov, danielen1337, yselivanov
priority: normal
severity: normal
status: open
title: asyncio open_connection fails when a socket is explicitly closed
versions: Python 3.9
___
Python tracker
<https://bugs.python.org/issue43253>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com