Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI hangs while establishing QMP monitor connection #49

Open
JayFoxRox opened this issue Oct 3, 2019 · 0 comments
Open

UI hangs while establishing QMP monitor connection #49

JayFoxRox opened this issue Oct 3, 2019 · 0 comments

Comments

@JayFoxRox
Copy link
Member

The UI hangs after hitting the start button, until QMP is connected.

This means that UI elements like the log that is being added in #48 are not refereshed, which means a large number of log messages are suddenly shown, once the connection is established.
The "Start" button won't change into "Stop" for about a second on my machine - this makes the UI feel unresponsive.

To avoid this, the connection loop should be improved / replaced:

xqemu-manager/main.py

Lines 288 to 302 in 00f3bf0

self._p = subprocess.Popen(cmd)
i = 0
while True:
print('Trying to connect %d' % i)
if i > 0: time.sleep(1)
try:
self._qmp = QEMUMonitorProtocol(('localhost', 4444))
self._qmp.connect()
except Exception as e:
if i > 4:
raise
else:
i += 1
continue
break

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant