修复了WS连接稳定性问题

This commit is contained in:
CSBOOK\44744
2026-06-27 20:29:09 +08:00
parent b829cd8ebc
commit caa4a7eded
16 changed files with 2197 additions and 248 deletions
@@ -156,7 +156,7 @@ static bool s_connected;
static bool s_stop_requested;
static portMUX_TYPE s_client_state_lock = portMUX_INITIALIZER_UNLOCKED;
static char s_bearer_token[MULTIMODAL_WS_TOKEN_MAX_LEN];
static char s_headers[384];
static char s_headers[768];
static multimodal_ws_event_callback_t s_event_cb;
static void *s_event_cb_ctx;
@@ -32,7 +32,9 @@ static void websocket_event_handler(void *handler_args,
stop_requested ? "WebSocket disconnected (local stop)" :
"WebSocket disconnected");
ws_set_stop_requested(false);
emit_event(MULTIMODAL_WS_EVENT_DISCONNECTED, NULL, 0U);
if (!stop_requested) {
emit_event(MULTIMODAL_WS_EVENT_DISCONNECTED, NULL, 0U);
}
break;
}