diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-12-14 17:49:16 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-25 22:20:05 +0000 |
commit | e53c1009356cc49c57d3b9af1e3dda6927acd78d (patch) | |
tree | d9e686c7eef47b5af9fe8ed4917bae6d6df0fec8 | |
parent | 39548791c84982c44c872a579e5b42d2720af98f (diff) | |
download | bitbake-e53c1009356cc49c57d3b9af1e3dda6927acd78d.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 a76b0a50c..0854d4809 100644 --- a/lib/bb/server/process.py +++ b/lib/bb/server/process.py @@ -473,6 +473,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)) |