xemu/python/qemu/aqmp
John Snow f26bd6ff21 python/aqmp: Fix disconnect during capabilities negotiation
If we receive ConnectionResetError (ECONNRESET) while attempting to
perform capabilities negotiation -- prior to the establishment of the
async reader/writer tasks -- the disconnect function is not aware that
we are in an error pathway.

As a result, when attempting to close the StreamWriter, we'll see the
same ConnectionResetError that caused us to initiate a disconnect in the
first place, which will cause the disconnect task itself to fail, which
emits a CRITICAL logging event.

I still don't know if there's a smarter way to check to see if an
exception received at this point is "the same" exception as the one that
caused the initial disconnect, but for now the problem can be avoided by
improving the error pathway detection in the exit path.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: John Snow <jsnow@redhat.com>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-id: 20211111143719.2162525-2-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
2021-11-16 14:26:36 -05:00
..
__init__.py python/aqmp: Remove scary message 2021-11-01 11:54:59 -04:00
aqmp_tui.py python/aqmp-tui: Add syntax highlighting 2021-09-27 12:10:29 -04:00
error.py
events.py python/aqmp: Return cleared events from EventListener.clear() 2021-10-12 12:22:10 -04:00
legacy.py python/aqmp: Create sync QMP wrapper for iotests 2021-11-01 11:54:59 -04:00
message.py python/aqmp: add QMP Message format 2021-09-27 12:10:29 -04:00
models.py python/aqmp: Add dict conversion method to Greeting object 2021-10-12 12:22:10 -04:00
protocol.py python/aqmp: Fix disconnect during capabilities negotiation 2021-11-16 14:26:36 -05:00
py.typed
qmp_client.py python/aqmp: add send_fd_scm 2021-10-12 12:22:10 -04:00
util.py python/aqmp: add asyncio_run compatibility wrapper 2021-09-27 12:10:29 -04:00