1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-03-22 10:34:49 +00:00

fix to prevent not opened connection close error

This commit is contained in:
catborise 2020-10-21 11:46:56 +03:00
parent d1cb6c2e52
commit 2f192128c4

View file

@ -144,7 +144,10 @@ def migrate_instance(
compress,
postcopy,
)
finally:
conn_migrate.close()
try:
conn_new = wvmInstance(
new_compute.hostname,
new_compute.login,
@ -156,7 +159,6 @@ def migrate_instance(
if autostart:
conn_new.set_autostart(1)
finally:
conn_migrate.close()
conn_new.close()
instance.compute = new_compute