Skip to content

Commit

Permalink
fix ws killpill (#4551)
Browse files Browse the repository at this point in the history
* websocket killpill

* oups

* nit

---------

Co-authored-by: Ruben Fiszel <[email protected]>
  • Loading branch information
HugoCasa and rubenfiszel authored Oct 18, 2024
1 parent fc7bbb9 commit 17d9541
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion backend/windmill-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ pub async fn run_server(
};

if !*CLOUD_HOSTED {
websocket_triggers::start_websockets(db.clone(), rsmq).await;
let ws_killpill_rx = rx.resubscribe();
websocket_triggers::start_websockets(db.clone(), rsmq, ws_killpill_rx).await;
}

// build our application with a route
Expand Down
2 changes: 1 addition & 1 deletion backend/windmill-api/src/websocket_triggers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ async fn listen_to_websocket(
} else {
tracing::error!("Websocket {} closed", url);
if let None =
update_ping(db.clone(), &ws_trigger, Some("Websocket cloesd")).await
update_ping(db.clone(), &ws_trigger, Some("Websocket closed")).await
{
return;
}
Expand Down

0 comments on commit 17d9541

Please sign in to comment.