mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
bitbake: server/process: Ensure we don't loop on client EOFError
The server currently crashes if we hit an EOFError due to controllersock still being in ready and the continue meaning ready isn't re-evaluated. Setting the value to False can mean the shutdown code doesn't handle the situation cleanly. Clear ready to avoid the crash/loop instead and handle any OSError whilst we're in here. (Bitbake rev: 2bc47e887c3b41417edaa89a8708c223fd2085de) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -164,7 +164,7 @@ class ProcessServer(multiprocessing.Process):
|
|||||||
|
|
||||||
self.haveui = True
|
self.haveui = True
|
||||||
|
|
||||||
except EOFError:
|
except (EOFError, OSError):
|
||||||
print("Disconnecting Client")
|
print("Disconnecting Client")
|
||||||
fds.remove(self.controllersock)
|
fds.remove(self.controllersock)
|
||||||
fds.remove(self.command_channel)
|
fds.remove(self.command_channel)
|
||||||
@@ -190,7 +190,7 @@ class ProcessServer(multiprocessing.Process):
|
|||||||
command = self.command_channel.get()
|
command = self.command_channel.get()
|
||||||
except EOFError:
|
except EOFError:
|
||||||
# Client connection shutting down
|
# Client connection shutting down
|
||||||
self.command_channel = False
|
ready = []
|
||||||
continue
|
continue
|
||||||
if command[0] == "terminateServer":
|
if command[0] == "terminateServer":
|
||||||
self.quit = True
|
self.quit = True
|
||||||
|
|||||||
Reference in New Issue
Block a user