diff --git a/rust/relay/src/allocation.rs b/rust/relay/src/allocation.rs index b51bf1753..cb6cf7a18 100644 --- a/rust/relay/src/allocation.rs +++ b/rust/relay/src/allocation.rs @@ -9,7 +9,7 @@ use std::net::SocketAddr; use tokio::task; /// The maximum amount of items that can be buffered in the channel to the allocation task. -const MAX_BUFFERED_ITEMS: usize = 10; +const MAX_BUFFERED_ITEMS: usize = 1000; pub struct Allocation { id: AllocationId, diff --git a/rust/relay/src/main.rs b/rust/relay/src/main.rs index 476906948..6cb22b009 100644 --- a/rust/relay/src/main.rs +++ b/rust/relay/src/main.rs @@ -17,7 +17,7 @@ use std::collections::HashMap; use std::convert::Infallible; use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr}; use std::pin::Pin; -use std::task::Poll; +use std::task::{ready, Poll}; use std::time::SystemTime; use tracing::{level_filters::LevelFilter, Instrument, Subscriber}; use tracing_core::Dispatch; @@ -367,6 +367,10 @@ where let _guard = span.enter(); loop { + // Don't fail these results. One of the senders might not be active because we might not be listening on IP4 / IP6. + let _ = ready!(self.outbound_ip4_data_sender.poll_ready_unpin(cx)); + let _ = ready!(self.outbound_ip6_data_sender.poll_ready_unpin(cx)); + let now = SystemTime::now(); // Priority 1: Execute the pending commands of the server. @@ -388,6 +392,7 @@ where ))); } + // Should never happen because we poll for readiness above. if e.is_full() { tracing::warn!(%recipient, "Dropping message because channel to primary UDP socket task is full"); }