Unverified Commit a4c402a7 authored by Nick Hill's avatar Nick Hill Committed by GitHub
Browse files

[BugFix] Avoid error traceback in logs when V1 `LLM` terminates (#13565)


Signed-off-by: default avatarNick Hill <nhill@redhat.com>
parent 550d97eb
......@@ -252,6 +252,7 @@ class SyncMPClient(MPClient):
outputs_queue = self.outputs_queue
def process_outputs_socket():
try:
while True:
(frame, ) = output_socket.recv_multipart(copy=False)
outputs = decoder.decode(frame.buffer)
......@@ -260,6 +261,9 @@ class SyncMPClient(MPClient):
utility_results)
else:
outputs_queue.put_nowait(outputs)
except zmq.error.ContextTerminated:
# Expected when the class is GC'd / during process termination.
pass
# Process outputs from engine in separate thread.
Thread(target=process_outputs_socket, daemon=True).start()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment