aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-14 17:49:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-14 18:14:08 +0000
commitf02114cb70e8f6f1d32e19c02b758fe0aadecd19 (patch)
tree9c9e243adff232b816c5ad8913c94125502ce03e /lib
parent5eaf9e7b26f09f5f106e1c3c6976d517b289450a (diff)
downloadbitbake-f02114cb70e8f6f1d32e19c02b758fe0aadecd19.tar.gz
server/process: Ensure socket has a timeout set
We're seeing hangs in oe-selftest where server startup and shutdown are racing. The assumption was a connect would timeout however no timeout is set which can leave processes hanging. Set a short timeout for the connection to avoid this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bb/server/process.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index 1a6a82674..f7d07266c 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -474,6 +474,8 @@ def connectProcessServer(sockname, featureset):
readfd = writefd = readfd1 = writefd1 = readfd2 = writefd2 = None
eq = command_chan_recv = command_chan = None
+ sock.settimeout(2)
+
try:
try:
os.chdir(os.path.dirname(sockname))