Skip to content

Commit 3e6e8b7

Browse files
committed
Merge torrust#741: Fix error messages starting UDP tracker
3a9c52f fix: error messages starting UDP tracker (Jose Celano) Pull request description: String interpolation was not being doing well. ACKs for top commit: josecelano: ACK 3a9c52f Tree-SHA512: 137968f4b71ce53fa80afd29c4d305b22fbe8f419544ca0d77a0867f506455f05cf12101fc154688116c8cb969b8a3fe605ab89650113ba1741d68ffe51264f8
2 parents 66f1635 + 3a9c52f commit 3e6e8b7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/servers/udp/server.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl Launcher {
203203

204204
#[derive(Default)]
205205
struct ActiveRequests {
206-
rb: StaticRb<AbortHandle, 50>, // the number of requests we handle at the same time.
206+
rb: StaticRb<AbortHandle, 1000>, // the number of requests we handle at the same time.
207207
}
208208

209209
impl std::fmt::Debug for ActiveRequests {
@@ -241,8 +241,14 @@ impl Udp {
241241
tx_start: oneshot::Sender<Started>,
242242
rx_halt: oneshot::Receiver<Halted>,
243243
) {
244-
let socket = Arc::new(UdpSocket::bind(bind_to).await.expect("Could not bind to {self.socket}."));
245-
let address = socket.local_addr().expect("Could not get local_addr from {binding}.");
244+
let socket = Arc::new(
245+
UdpSocket::bind(bind_to)
246+
.await
247+
.unwrap_or_else(|_| panic!("Could not bind to {bind_to}.")),
248+
);
249+
let address = socket
250+
.local_addr()
251+
.unwrap_or_else(|_| panic!("Could not get local_addr from {bind_to}."));
246252
let halt = shutdown_signal_with_message(rx_halt, format!("Halting Http Service Bound to Socket: {address}"));
247253

248254
info!(target: "UDP TRACKER", "Starting on: udp://{}", address);

0 commit comments

Comments
 (0)