Fix: Wait for send_task to be ready before executing start.bas
All checks were successful
BotServer CI / build (push) Successful in 15m19s
All checks were successful
BotServer CI / build (push) Successful in 15m19s
This commit is contained in:
parent
8f073a15fd
commit
6e594d68dd
1 changed files with 2 additions and 2 deletions
|
|
@ -1318,6 +1318,8 @@ async fn handle_websocket(
|
|||
}
|
||||
}
|
||||
|
||||
let (send_ready_tx, send_ready_rx) = tokio::sync::mpsc::channel::<()>(1);
|
||||
|
||||
// Execute start.bas automatically on connection (similar to auth.ast pattern)
|
||||
{
|
||||
let bot_name_result = {
|
||||
|
|
@ -1445,8 +1447,6 @@ async fn handle_websocket(
|
|||
}
|
||||
}
|
||||
|
||||
let (send_ready_tx, mut send_ready_rx) = tokio::sync::mpsc::channel::<()>(1);
|
||||
|
||||
let mut send_task = tokio::spawn(async move {
|
||||
while let Some(response) = rx.recv().await {
|
||||
if let Ok(json_str) = serde_json::to_string(&response) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue