From a8126f7207e17a7223456ff7fbeeeea2ddf2b450 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期四, 10 八月 2023 19:05:33 +0800
Subject: [PATCH] update websocket-server-2pass
---
funasr/runtime/websocket/websocket-server-2pass.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/funasr/runtime/websocket/websocket-server-2pass.cpp b/funasr/runtime/websocket/websocket-server-2pass.cpp
index 0b92c97..50f0edc 100644
--- a/funasr/runtime/websocket/websocket-server-2pass.cpp
+++ b/funasr/runtime/websocket/websocket-server-2pass.cpp
@@ -152,8 +152,10 @@
} catch (std::exception const& e) {
LOG(ERROR) << e.what();
}
- for (auto& vec : punc_cache) {
- vec.clear();
+ if(punc_cache.size()>0){
+ for (auto& vec : punc_cache) {
+ vec.clear();
+ }
}
if (Result) {
websocketpp::lib::error_code ec;
--
Gitblit v1.9.1