mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-25 15:45:23 +00:00
fix to prevent not opened connection close error
This commit is contained in:
parent
83c8eccde3
commit
f759dc6564
1 changed files with 3 additions and 1 deletions
|
@ -144,7 +144,10 @@ def migrate_instance(
|
||||||
compress,
|
compress,
|
||||||
postcopy,
|
postcopy,
|
||||||
)
|
)
|
||||||
|
finally:
|
||||||
|
conn_migrate.close()
|
||||||
|
|
||||||
|
try:
|
||||||
conn_new = wvmInstance(
|
conn_new = wvmInstance(
|
||||||
new_compute.hostname,
|
new_compute.hostname,
|
||||||
new_compute.login,
|
new_compute.login,
|
||||||
|
@ -156,7 +159,6 @@ def migrate_instance(
|
||||||
if autostart:
|
if autostart:
|
||||||
conn_new.set_autostart(1)
|
conn_new.set_autostart(1)
|
||||||
finally:
|
finally:
|
||||||
conn_migrate.close()
|
|
||||||
conn_new.close()
|
conn_new.close()
|
||||||
|
|
||||||
instance.compute = new_compute
|
instance.compute = new_compute
|
||||||
|
|
Loading…
Reference in a new issue