Skip to content

Commit

Permalink
Code cleanups
Browse files Browse the repository at this point in the history
Remove commented-out code, reorder some lines
  • Loading branch information
int08h committed May 27, 2024
1 parent 5946232 commit 160da01
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ impl Server {
/// [`ServerConfig`](../config/trait.ServerConfig.html) trait object instance.
///
pub fn new(config: &dyn ServerConfig, socket: Arc<UdpSocket>) -> Server {
// let sock_addr = config.udp_socket_addr().expect("udp sock addr");
// let socket = UdpSocket::bind(&sock_addr).expect("failed to bind to socket");

let poll_duration = Some(Duration::from_millis(100));

let mut timer: Timer<()> = Timer::default();
timer.set_timeout(config.status_interval(), ());

Expand Down Expand Up @@ -139,6 +134,7 @@ impl Server {
let batch_size = config.batch_size();
let status_interval = config.status_interval();
let thread_name = thread::current().name().unwrap().to_string();
let poll_duration = Some(Duration::from_millis(100));

Server {
batch_size,
Expand All @@ -153,7 +149,6 @@ impl Server {
responder_classic,
buf: [0u8; 65_536],
thread_name,

stats,

#[cfg(fuzzing)]
Expand Down

0 comments on commit 160da01

Please sign in to comment.