[oe-commits] [bitbake] 02/02: server/process: Try connecting 4 times before giving up
git at git.openembedded.org
git at git.openembedded.org
Wed Mar 9 22:48:49 UTC 2016
rpurdie pushed a commit to branch master
in repository bitbake.
commit 4a7fe63126dd8177baa5ad21e59e0bebeea8c596
Author: Lucas Dutra Nunes <ldnunes at ossystems.com.br>
AuthorDate: Tue Mar 1 10:13:34 2016 -0300
server/process: Try connecting 4 times before giving up
Instead of trying one time with a timeout of 20 seconds try 4 times with
a timeout of 5 seconds, to account for a slow server start.
Signed-off-by: Lucas Dutra Nunes <ldnunes at ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
lib/bb/server/process.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 1e2b824..e387b30 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -53,10 +53,12 @@ class ServerCommunicator():
while True:
# don't let the user ctrl-c while we're waiting for a response
try:
- if self.connection.poll(20):
- return self.connection.recv()
- else:
- bb.fatal("Timeout while attempting to communicate with bitbake server")
+ for idx in range(0,4): # 0, 1, 2, 3
+ if self.connection.poll(5):
+ return self.connection.recv()
+ else:
+ bb.warn("Timeout while attempting to communicate with bitbake server")
+ bb.fatal("Gave up; Too many tries: timeout while attempting to communicate with bitbake server")
except KeyboardInterrupt:
pass
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list