diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-14 17:49:16 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-01-28 16:59:33 +0000 |
commit | 833d95f538c007c27c6eb8d8f2f97094dc2b1a41 (patch) | |
tree | 01a2e2b323863f77b4f045c569515e4030fece91 | |
parent | 257ed88590883f46beec0164749e45733e67954e (diff) | |
download | bitbake-contrib-833d95f538c007c27c6eb8d8f2f97094dc2b1a41.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>
-rw-r--r-- | lib/bb/server/process.py | 2 |
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)) |