diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index c9984539e8..12dfb6ea19 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -88,6 +88,7 @@ class ProcessServer():
         self.maxuiwait = 30
         self.xmlrpc = False
 
+        self.idle_count = 1
         self.idle = None
         self._idlefuns = {}
 
@@ -178,6 +179,13 @@ class ProcessServer():
                 del self.event_writer
                 self.lastui = time.time()
                 self.cooker.command.finishAsyncDisconnect()
+
+                # Wait for the idle loop to have executed (5s max)
+                count = self.idle_count
+                start = time.time()
+                while count == self.idle_count and time.time() < (start + 5):
+                    continue
+
                 self.cooker.clientComplete()
                 self.haveui = False
             ready = select.select(fds,[],[],0)[0]
@@ -360,6 +368,11 @@ class ProcessServer():
 
     def idle_thread(self):
         while not self.quit:
+            # Show activity
+            if self.idle_count > 100000000:
+                self.idle_count = 1
+            self.idle_count = self.idle_count + 1
+
             nextsleep = 0.1
             fds = []
             for function, data in list(self._idlefuns.items()):
