雾聪 2 سال پیش
والد
کامیت
29ce4c1526
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      runtime/websocket/bin/funasr-wss-server-2pass.cpp
  2. 1 1
      runtime/websocket/bin/funasr-wss-server.cpp

+ 1 - 1
runtime/websocket/bin/funasr-wss-server-2pass.cpp

@@ -439,7 +439,7 @@ int main(int argc, char* argv[]) {
     funasr::ExtractHws(hotword_path, hws_map_);
 
     bool is_ssl = false;
-    if (!s_certfile.empty()) {
+    if (!s_certfile.empty() && access(s_certfile.c_str(), F_OK) == 0) {
       is_ssl = true;
     }
 

+ 1 - 1
runtime/websocket/bin/funasr-wss-server.cpp

@@ -419,7 +419,7 @@ int main(int argc, char* argv[]) {
     funasr::ExtractHws(hotword_path, hws_map_);
 
     bool is_ssl = false;
-    if (!s_certfile.empty()) {
+    if (!s_certfile.empty() && access(s_certfile.c_str(), F_OK) == 0) {
       is_ssl = true;
     }