diff --git a/backend/src/handlers/socket.rs b/backend/src/handlers/socket.rs index 9171af00..1a5c21c1 100644 --- a/backend/src/handlers/socket.rs +++ b/backend/src/handlers/socket.rs @@ -22,7 +22,7 @@ use futures::{Stream, StreamExt}; use sea_orm::{ColumnTrait, Condition, EntityTrait, QueryFilter, QueryOrder, QuerySelect}; use serde::{Deserialize, Serialize}; use std::{borrow::Cow, error::Error as _, mem::MaybeUninit, pin::pin, time::Duration}; -use tokio::time::{self, sleep, timeout}; +use tokio::time::{self, sleep}; use tokio_tungstenite::tungstenite::error::Error as TungsteniteError; use tracing::Instrument; use uuid::Uuid; @@ -193,7 +193,7 @@ async fn socket_handler(state: S, socket: &mut WebSocket) -> Resu break Err(error::WEBSOCKET_ERROR) } } - Ok(Some(event)) = timeout(Duration::from_secs(5), consumer.next()), if has_sent_initial_problems => { + Some(event) = consumer.next() => { let event_text = serde_json::to_string(&event).unwrap(); if matches!(event, Event::DisbandTeam)