diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-27 22:06:02 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-07-28 12:40:11 +0100 |
commit | 449e07c1979ebce582ccc51c01ffc3b36892c7b4 (patch) | |
tree | 2bcb3a469634a26eff9e3a86e1c3569feb74b87d /bitbake | |
parent | 94eb5724b111cf3409219be3b169af79858eab7b (diff) | |
download | poky-449e07c1979ebce582ccc51c01ffc3b36892c7b4.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: e7c387c2e2fb2cc3ca1dc9d2029362909c326d72)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/server/process.py | 4 |
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 | ||