summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-28 12:58:56 -1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-29 00:21:40 +0100
commit11009210ccc15a3052846df04a43706e83ae54fd (patch)
treed01584dc982584a4c686503f0c729c2d3a89b157
parent569b1f5d67c57de957e243997c53ec2f81dc8dfe (diff)
downloadpoky-11009210ccc15a3052846df04a43706e83ae54fd.tar.gz
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 <richard.purdie@linuxfoundation.org> (cherry picked from commit e7c387c2e2fb2cc3ca1dc9d2029362909c326d72) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--bitbake/lib/bb/server/process.py4
1 files changed, 3 insertions, 1 deletions
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):
47 self.next_heartbeat = time.time() 47 self.next_heartbeat = time.time()
48 48
49 self.event_handle = None 49 self.event_handle = None
50 self.hadanyui = False
50 self.haveui = False 51 self.haveui = False
51 self.maxuiwait = 30 52 self.maxuiwait = 30
52 self.xmlrpc = False 53 self.xmlrpc = False
@@ -188,6 +189,7 @@ class ProcessServer(multiprocessing.Process):
188 self.command_channel_reply = writer 189 self.command_channel_reply = writer
189 190
190 self.haveui = True 191 self.haveui = True
192 self.hadanyui = True
191 193
192 except (EOFError, OSError): 194 except (EOFError, OSError):
193 disconnect_client(self, fds) 195 disconnect_client(self, fds)
@@ -200,7 +202,7 @@ class ProcessServer(multiprocessing.Process):
200 # If we don't see a UI connection within maxuiwait, its unlikely we're going to see 202 # If we don't see a UI connection within maxuiwait, its unlikely we're going to see
201 # one. We have had issue with processes hanging indefinitely so timing out UI-less 203 # one. We have had issue with processes hanging indefinitely so timing out UI-less
202 # servers is useful. 204 # servers is useful.
203 if not self.haveui and not self.timeout and (self.lastui + self.maxuiwait) < time.time(): 205 if not self.hadanyui and not self.timeout and (self.lastui + self.maxuiwait) < time.time():
204 print("No UI connection within max timeout, exiting to avoid infinite loop.") 206 print("No UI connection within max timeout, exiting to avoid infinite loop.")
205 self.quit = True 207 self.quit = True
206 208