Events delivered during Capabilities Negotiation mode
Hey,
I'm writing my own QMP client in Go, and when testing, I discovered that upon connection, when trying to read the greeting and the response for qmp_capabilities
, I'll occasionally get an event
message instead from a previous connection's execution.
According to the QMP spec, I'm not sure this should be allowed to happen:
In this mode only the qmp_capabilities command is allowed to run; all other commands will return the CommandNotFound error. Asynchronous messages are not delivered either.
I don't know if "Asynchronous messages" includes events, but when I went to see how this client library handles it, I couldn't see that it does. Perhaps I'm missing it? It looks like that when in negotiation mode we're expecting the first message to be the greeting, and also expecting only a valid return for qmp_capabilities
.
I've tried this against the QEMU Storage Daemon, if that helps. Is this a bug in the server implementation, or are clients expected to handle this?
Thank you!
cc @jsnow