summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-21 09:15:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-11-21 09:22:15 +0000
commit410c11dd10736873f2dc587fbe9119c38831e693 (patch)
tree1a9315c38b37ac688422b225a94c8ba8210503cb
parent2734240da2cc150f811129a6adf6eb4b2161b204 (diff)
downloadbitbake-410c11dd10736873f2dc587fbe9119c38831e693.tar.gz
server/process.py: Change timeout error handling
In normal usage, we never hit the timeout issue. If we do, it becomes obvious that the current error handling is not good enough. The request may have made it to the server and the answer will get queued. This means the next command may get the return value from the previous command with suitably puzzling results. Without rewriting large sections of code, its not possible to avoid this problem. It is better to increase the timeout to several seconds giving the server a chance to respond and if it does timeout, hard exit since recovery is not possible with the code base today. I'd be happy to see the structure of this code improved but this quick fix at least stops corrupted builds from happening which has to be a good thing. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/server/process.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index f1e8450b1..8ebf77187 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -45,10 +45,10 @@ class ServerCommunicator():
while True:
# don't let the user ctrl-c while we're waiting for a response
try:
- if self.connection.poll(.5):
+ if self.connection.poll(20):
return self.connection.recv()
else:
- return None, "Timeout while attempting to communicate with bitbake server"
+ bb.fatal("Timeout while attempting to communicate with bitbake server")
except KeyboardInterrupt:
pass