Skip to content

Commit

Permalink
Remove timeout from nats events (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
smrtrfszm authored Dec 8, 2024
1 parent fd0e7be commit c495dda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/handlers/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -193,7 +193,7 @@ async fn socket_handler<S: StateTrait>(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)
Expand Down

0 comments on commit c495dda

Please sign in to comment.