fix(runtime/go): websocket client premature close in offline mode (#2834)

Move offline_msg_done signal after the ReadMessage loop exits (when
server closes connection), not on first message receipt. Previously,
multi-segment audio would only get the first segment transcribed
before the client closed the connection.
This commit is contained in:
游雁
2026-05-24 00:18:40 +08:00
parent be26718559
commit 13b244d4c2
+1 -1
View File
@@ -330,9 +330,9 @@ func message(id string) {
text_print += fmt.Sprintf("%s ", text)
}
fmt.Println("\rpid" + id + ": " + wav_name + ": " + text_print)
offline_msg_done = true
}
}
offline_msg_done = true
}
func wsClient(id, chunk_begin, chunk_size int, done chan bool) {