Skip to content

Commit e3143f7

Browse files
committed
feat: log aborted UDP requests
This will add a warning to the lofs when a UDP request is aborted.
1 parent 5348669 commit e3143f7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/servers/udp/server.rs

+7
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,14 @@ impl Udp {
291291
if !h.is_finished() {
292292
// the task is still running, lets yield and give it a chance to flush.
293293
tokio::task::yield_now().await;
294+
294295
h.abort();
296+
297+
let server_socket_addr = socket.local_addr().expect("Could not get local_addr for socket.");
298+
299+
tracing::span!(
300+
target: "UDP TRACKER",
301+
tracing::Level::WARN, "request-aborted", server_socket_addr = %server_socket_addr);
295302
}
296303
}
297304
}

0 commit comments

Comments
 (0)