summaryrefslogtreecommitdiffstats
path: root/python/qemu/aqmp/__init__.py
diff options
context:
space:
mode:
authorJohn Snow2021-10-26 19:56:06 +0200
committerJohn Snow2021-11-01 16:54:59 +0100
commit49a608b8c22db72d47e7676ff9c3b87d1d408736 (patch)
treec1eaa16e66fc8d1d887e3d45dfd16ba5d849fa98 /python/qemu/aqmp/__init__.py
parentpython/machine: remove has_quit argument (diff)
downloadqemu-49a608b8c22db72d47e7676ff9c3b87d1d408736.tar.gz
qemu-49a608b8c22db72d47e7676ff9c3b87d1d408736.tar.xz
qemu-49a608b8c22db72d47e7676ff9c3b87d1d408736.zip
python/machine: Handle QMP errors on close more meticulously
To use the AQMP backend, Machine just needs to be a little more diligent about what happens when closing a QMP connection. The operation is no longer a freebie in the async world; it may return errors encountered in the async bottom half on incoming message receipt, etc. (AQMP's disconnect, ultimately, serves as the quiescence point where all async contexts are gathered together, and any final errors reported at that point.) Because async QMP continues to check for messages asynchronously, it's almost certainly likely that the loop will have exited due to EOF after issuing the last 'quit' command. That error will ultimately be bubbled up when attempting to close the QMP connection. The manager class here then is free to discard it -- if it was expected. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Message-id: 20211026175612.4127598-3-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'python/qemu/aqmp/__init__.py')
0 files changed, 0 insertions, 0 deletions