migration: Add buffered_flush error handling
Now that we have error handling we can do proper handling of
buffered_flush().
Signed-off-by: Juan Quintela <[email protected]>
Reviewed-by: Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
diff --git a/migration.c b/migration.c
index 7ae1d93..17eb27d 100644
--- a/migration.c
+++ b/migration.c
@@ -757,7 +757,8 @@
/* usleep expects microseconds */
g_usleep((initial_time + BUFFER_DELAY - current_time)*1000);
}
- if (buffered_flush(s) < 0) {
+ ret = buffered_flush(s);
+ if (ret < 0) {
break;
}