mirror of
git://git.yoctoproject.org/poky
synced 2026-08-14 00:16:29 +00:00
bitbake: process: Handle EWOULDBLOCK in socket connect
Now that we set a timeout for the socket, it can return EWOULDBLOCK if a signal or other event happens to wake up even if we don't timeout. If this happens, retry the connection, else we simply see it quickly loop through the retries and abort the connection in a very short interval. (Bitbake rev: c2000651a200530ba08161207ade5eea8bbeec43) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
86209d4365
commit
563a74d522
@ -479,7 +479,14 @@ def connectProcessServer(sockname, featureset):
|
||||
try:
|
||||
try:
|
||||
os.chdir(os.path.dirname(sockname))
|
||||
sock.connect(os.path.basename(sockname))
|
||||
finished = False
|
||||
while not finished:
|
||||
try:
|
||||
sock.connect(os.path.basename(sockname))
|
||||
finished = True
|
||||
except IOError as e:
|
||||
if e.errno == errno.EWOULDBLOCK:
|
||||
pass
|
||||
finally:
|
||||
os.chdir(cwd)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user