aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-27 22:06:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-27 22:52:58 +0100
commite7c387c2e2fb2cc3ca1dc9d2029362909c326d72 (patch)
treed9e20a4f2a67f95c0a98a2bd6d2c9497954543ba
parent379951b6417eacbafc92ac1413ae1358bafdddfb (diff)
downloadbitbake-e7c387c2e2fb2cc3ca1dc9d2029362909c326d72.tar.gz
server/process: Fix UI first connection tracking
We're only meant to be doing UI connection timeouts on the first connection but haveui changes for each connection. We need to add a specific variable to track this correctly and get the intended behaviour. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/server/process.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 9ec79f5b6..5a87f0820 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -47,6 +47,7 @@ class ProcessServer(multiprocessing.Process):
self.next_heartbeat = time.time()
self.event_handle = None
+ self.hadanyui = False
self.haveui = False
self.maxuiwait = 30
self.xmlrpc = False
@@ -188,6 +189,7 @@ class ProcessServer(multiprocessing.Process):
self.command_channel_reply = writer
self.haveui = True
+ self.hadanyui = True
except (EOFError, OSError):
disconnect_client(self, fds)
@@ -200,7 +202,7 @@ class ProcessServer(multiprocessing.Process):
# If we don't see a UI connection within maxuiwait, its unlikely we're going to see
# one. We have had issue with processes hanging indefinitely so timing out UI-less
# servers is useful.
- if not self.haveui and not self.timeout and (self.lastui + self.maxuiwait) < time.time():
+ if not self.hadanyui and not self.timeout and (self.lastui + self.maxuiwait) < time.time():
print("No UI connection within max timeout, exiting to avoid infinite loop.")
self.quit = True