Skip to content

Commit 60d6761

Browse files
authored
Merge pull request #426 from simvue-io/hotfix/no-hang-on-api-call
Fix hanging on API call in Run
2 parents 2b773d5 + 9daa830 commit 60d6761

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

simvue/run.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,9 +377,13 @@ def _online_dispatch_callback(
377377

378378
_msgpack_header = headers | {"Content-Type": "application/msgpack"}
379379

380-
sv_api.post(
381-
url=_url, headers=_msgpack_header, data=_data_bin, is_json=False
382-
)
380+
try:
381+
sv_api.post(
382+
url=_url, headers=_msgpack_header, data=_data_bin, is_json=False
383+
)
384+
except (ValueError, RuntimeError) as e:
385+
self._error(f"{e}")
386+
return
383387

384388
return (
385389
_online_dispatch_callback

0 commit comments

Comments
 (0)