From 6e592645ab0bf5a53a887abdb7bb83c887fae526 Mon Sep 17 00:00:00 2001
From: Anders Blomdell <anders.blomdell@control.lth.se>
Date: Thu, 7 Jan 2021 12:32:59 +0100
Subject: [PATCH] Improve logging

---
 primary.py   | 1 +
 secondary.py | 1 +
 2 files changed, 2 insertions(+)

diff --git a/primary.py b/primary.py
index bbf7314..6ab686f 100644
--- a/primary.py
+++ b/primary.py
@@ -121,6 +121,7 @@ class Server:
                                   stderr=self.log.makefile(encoding='utf-8'))
             self.log.DEBUG('OK run_star', cmd, cwd)
         finally:
+            self.log.MESSAGE('shutting down star_socket')
             star_socket.shutdown(socket.SHUT_RDWR)
         self.log.DEBUG('DONE run_star', cmd, cwd)
 
diff --git a/secondary.py b/secondary.py
index 9b30d40..6265ef9 100644
--- a/secondary.py
+++ b/secondary.py
@@ -131,6 +131,7 @@ class Backup:
             self.primary_in.write(parent + b'\0')
             parent = os.path.dirname(parent)
         self.primary_in.write(src.name + b'\0')
+        self.primary_in.flush()
 
     def delete(self, dst):
         self.log.DEBUG('Delete:', dst.name)
-- 
GitLab