summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorLucas Dutra Nunes <ldnunes@ossystems.com.br>2016-03-01 10:13:34 -0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-09 22:47:29 +0000
commitd53413d3a8444c38a83ea37867c8af7754d8e702 (patch)
tree9ece131b5b8aae4f3fa0dbf671d2d2f8d421751b /bitbake/lib
parent0f0105932cbb364041d3380740ba481250bffe32 (diff)
downloadpoky-d53413d3a8444c38a83ea37867c8af7754d8e702.tar.gz
bitbake: 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. (Bitbake rev: 4a7fe63126dd8177baa5ad21e59e0bebeea8c596) Signed-off-by: Lucas Dutra Nunes <ldnunes@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/server/process.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index 1e2b8249a9..e387b30ee3 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -53,10 +53,12 @@ class ServerCommunicator():
53 while True: 53 while True:
54 # don't let the user ctrl-c while we're waiting for a response 54 # don't let the user ctrl-c while we're waiting for a response
55 try: 55 try:
56 if self.connection.poll(20): 56 for idx in range(0,4): # 0, 1, 2, 3
57 return self.connection.recv() 57 if self.connection.poll(5):
58 else: 58 return self.connection.recv()
59 bb.fatal("Timeout while attempting to communicate with bitbake server") 59 else:
60 bb.warn("Timeout while attempting to communicate with bitbake server")
61 bb.fatal("Gave up; Too many tries: timeout while attempting to communicate with bitbake server")
60 except KeyboardInterrupt: 62 except KeyboardInterrupt:
61 pass 63 pass
62 64