]> git.proxmox.com Git - qemu.git/blobdiff - migration-exec.c
migration: clean up server sockets and handlers before invoking process_incoming_migr...
[qemu.git] / migration-exec.c
index 519af57ac7d6fc35bb0373b67f74dc22722c5154..014c60f01d02cfcd50c55ab72bc875f5a3f5974c 100644 (file)
@@ -87,8 +87,8 @@ static void exec_accept_incoming_migration(void *opaque)
 {
     QEMUFile *f = opaque;
 
+    qemu_set_fd_handler2(qemu_get_fd(f), NULL, NULL, NULL, NULL);
     process_incoming_migration(f);
-    qemu_set_fd_handler2(qemu_stdio_fd(f), NULL, NULL, NULL, NULL);
     qemu_fclose(f);
 }
 
@@ -103,6 +103,6 @@ void exec_start_incoming_migration(const char *command, Error **errp)
         return;
     }
 
-    qemu_set_fd_handler2(qemu_stdio_fd(f), NULL,
+    qemu_set_fd_handler2(qemu_get_fd(f), NULL,
                         exec_accept_incoming_migration, NULL, f);
 }