Expected behaviour is that a ConnectionRefusedError is raised. Without Quamash, that is what happens. With quamash, run_until_complete never finishes and the following warning is printed
WARNING<7>:quamash._QEventLoop:Event callback failed
Traceback (most recent call last):
File "c:\scratch\quamash\quamash\_windows.py", line 42, in _process_events
value = callback(transferred, key, ov)
File "C:\Users\localadmin\Anaconda3\envs\artiq-env\lib\asyncio\windows_events.py", line 509, in finish_connect
ov.getresult()
ConnectionRefusedError: [WinError 1225] The remote computer refused the network connection
It looks like the future gets stuck in the PENDING state. I believe this is related to e5fc6b110830ebcc90496da07f1d75064eff6d08
Changing this to
except OSError as e:
self._logger.warning('Event callback failed', exc_info=sys.exc_info())
if not f.done():
f.set_exception(e)
The following code snippet should tries to connect to a server that doesn't exist
Expected behaviour is that a
ConnectionRefusedError
is raised. Without Quamash, that is what happens. With quamash,run_until_complete
never finishes and the following warning is printedIt looks like the future gets stuck in the
PENDING
state. I believe this is related to e5fc6b110830ebcc90496da07f1d75064eff6d08Changing this to
seems to resolve the issue. Thoughts?