1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00

fix to prevent not opened connection close error

This commit is contained in:
catborise 2020-10-21 12:08:58 +03:00
parent 83c8eccde3
commit f759dc6564

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