digitalocean/go-qemu

Calling qmp.Disconnect() before qmp.Connect() returns blocks indefinitely

tomponline opened this issue · 1 comments

See https://github.com/lxc/lxd/issues/11892#issuecomment-1607086255

As well as fixing the direct issue, it would also be useful to add a qmp.ConnectCtx() function that allows cancellation of a connection attempt rather than needing to call qmp.ConnectCtx() in a separate go routine and then calling qmp.Disconnect() if it doesn't return in an expected amount of time.

Would you be open for contributions for such a change?

Thanks!

I think ConnectCtx() would be a great idea.