From 11009210ccc15a3052846df04a43706e83ae54fd Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 28 Jul 2020 12:58:56 -1000 Subject: bitbake: 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. (Bitbake rev: fda107a4a1033ac7111a3289dbe6e48cea986927) Signed-off-by: Richard Purdie (cherry picked from commit e7c387c2e2fb2cc3ca1dc9d2029362909c326d72) Signed-off-by: Steve Sakoman Signed-off-by: Richard Purdie --- bitbake/lib/bb/server/process.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 9ec79f5b64..5a87f0820d 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/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 -- cgit v1.2.3-54-g00ecf