Add notifier to break relay loop

This commit is contained in:
Tobias Reisinger 2023-12-07 04:30:33 +01:00
parent 83c1f033d5
commit 8785186dfa
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
12 changed files with 124 additions and 45 deletions
emgauwa-core/src/handlers/v1/ws

View file

@ -14,7 +14,7 @@ pub mod controllers;
#[get("/api/v1/ws/controllers")]
pub async fn ws_controllers(
pool: web::Data<Pool<Sqlite>>,
app_server: web::Data<Addr<AppState>>,
app_state: web::Data<Addr<AppState>>,
req: HttpRequest,
stream: web::Payload,
) -> Result<HttpResponse, EmgauwaError> {
@ -22,7 +22,7 @@ pub async fn ws_controllers(
ControllerWs {
pool: pool.get_ref().clone(),
controller_uid: None,
app_server: app_server.get_ref().clone(),
app_state: app_state.get_ref().clone(),
hb: Instant::now(),
},
&req,