mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-24 17:38:41 -06:00
ADK changes
PiperOrigin-RevId: 750287732
This commit is contained in:
parent
7cc3167e54
commit
645402903a
@ -756,6 +756,12 @@ def get_fast_api_app(
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.exception("Error during live websocket communication: %s", e)
|
logger.exception("Error during live websocket communication: %s", e)
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
WEBSOCKET_INTERNAL_ERROR_CODE = 1011
|
||||||
|
WEBSOCKET_MAX_BYTES_FOR_REASON = 123
|
||||||
|
await websocket.close(
|
||||||
|
code=WEBSOCKET_INTERNAL_ERROR_CODE,
|
||||||
|
reason=str(e)[:WEBSOCKET_MAX_BYTES_FOR_REASON],
|
||||||
|
)
|
||||||
finally:
|
finally:
|
||||||
for task in pending:
|
for task in pending:
|
||||||
task.cancel()
|
task.cancel()
|
||||||
|
Loading…
Reference in New Issue
Block a user