@@ -241,6 +241,9 @@ static void migrate_fd_put_notify(void *opaque)
qemu_set_fd_handler2(s->fd, NULL, NULL, NULL, NULL);
qemu_file_put_notify(s->file);
+ if (qemu_file_has_error(s->file)) {
+ migrate_fd_error(s);
+ }
}
static ssize_t migrate_fd_put_buffer(void *opaque, const void *data,
@@ -258,12 +261,6 @@ static ssize_t migrate_fd_put_buffer(void *opaque, const void *data,
if (ret == -EAGAIN) {
qemu_set_fd_handler2(s->fd, NULL, NULL, migrate_fd_put_notify, s);
- } else if (ret < 0) {
- if (s->mon) {
- monitor_resume(s->mon);
- }
- s->state = MIG_STATE_ERROR;
- notifier_list_notify(&migration_state_notifiers);
}
return ret;