mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-26 15:40:18 +00:00
fix: address review feedback on PTC
- Fix Python SDK client timeout to use actual timeout_secs + 5s buffer instead of enforcing 60s minimum - Cap tool execution timeout at MAX_TIMEOUT_SECS instead of falling back to default when exceeded - Use RAII guard for tool_nesting_depth to ensure decrement on panic Co-Authored-By: Claude Opus 4.6 <[email protected]>
This commit is contained in:
@@ -84,7 +84,7 @@ def call_tool(name, params=None, timeout_secs=None):
|
||||
)
|
||||
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=(timeout_secs or 60) + 5) as resp:
|
||||
with urllib.request.urlopen(req, timeout=(timeout_secs if timeout_secs is not None else 60) + 5) as resp:
|
||||
result = json.loads(resp.read().decode("utf-8"))
|
||||
except urllib.error.HTTPError as e:
|
||||
body_text = e.read().decode("utf-8", errors="replace") if e.fp else ""
|
||||
|
||||
Reference in New Issue
Block a user