Now that we have error handling we can do proper handling of
buffered_flush().

Signed-off-by: Juan Quintela <quint...@redhat.com>
---
 migration.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/migration.c b/migration.c
index 336941b..031302b 100644
--- a/migration.c
+++ b/migration.c
@@ -768,7 +768,8 @@ static void *buffered_file_thread(void *opaque)
             /* usleep expects microseconds */
             usleep((initial_time + BUFFER_DELAY - current_time)*1000);
         }
-        if (buffered_flush(s) < 0) {
+        ret = buffered_flush(s);
+        if (ret < 0) {
             break;
         }

-- 
1.7.11.7


Reply via email to