summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/process.py
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:22 +0000
commitdee77eca39f406f90e60d9c5ef7a66fcc8f57dbf (patch)
tree54dc4fc339419bd1a5a91c04b2eda023a7ad9ee0 /bitbake/lib/bb/server/process.py
parent212397c87becd84261a8646d7af5830be923788a (diff)
downloadpoky-dee77eca39f406f90e60d9c5ef7a66fcc8f57dbf.tar.gz
bitbake: 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. (Bitbake rev: 410c11dd10736873f2dc587fbe9119c38831e693) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server/process.py')
-rw-r--r--bitbake/lib/bb/server/process.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index f1e8450b12..8ebf771878 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -45,10 +45,10 @@ class ServerCommunicator():
45 while True: 45 while True:
46 # don't let the user ctrl-c while we're waiting for a response 46 # don't let the user ctrl-c while we're waiting for a response
47 try: 47 try:
48 if self.connection.poll(.5): 48 if self.connection.poll(20):
49 return self.connection.recv() 49 return self.connection.recv()
50 else: 50 else:
51 return None, "Timeout while attempting to communicate with bitbake server" 51 bb.fatal("Timeout while attempting to communicate with bitbake server")
52 except KeyboardInterrupt: 52 except KeyboardInterrupt:
53 pass 53 pass
54 54