diff --git a/tools/code_execution_tool.py b/tools/code_execution_tool.py index 8c103e2f1..63ac7dec2 100644 --- a/tools/code_execution_tool.py +++ b/tools/code_execution_tool.py @@ -511,6 +511,7 @@ def execute_code( duration = round(time.monotonic() - exec_start, 2) # Wait for RPC thread to finish + server_sock.close() # break accept() so thread exits promptly rpc_thread.join(timeout=3) # Build response