Remove unused prints
This commit is contained in:
parent
f3429ff4e8
commit
4c24d1ce46
@ -234,7 +234,7 @@ impl ConnectionManager {
|
|||||||
|
|
||||||
let now = Instant::now();
|
let now = Instant::now();
|
||||||
|
|
||||||
self.connections.retain(|addr, conn| {
|
self.connections.retain(|_, conn| {
|
||||||
let retain = match conn.state {
|
let retain = match conn.state {
|
||||||
ConnectionState::ReceivingClosing => {
|
ConnectionState::ReceivingClosing => {
|
||||||
if (now - conn.last_recv_close) > Duration::from_millis(500) {
|
if (now - conn.last_recv_close) > Duration::from_millis(500) {
|
||||||
@ -253,8 +253,6 @@ impl ConnectionManager {
|
|||||||
retain
|
retain
|
||||||
});
|
});
|
||||||
|
|
||||||
for (addr, conn) in &self.connections {}
|
|
||||||
|
|
||||||
messages
|
messages
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -287,14 +285,10 @@ impl UdpWrapper {
|
|||||||
if buf.len() > DATAGRAM_SIZE {
|
if buf.len() > DATAGRAM_SIZE {
|
||||||
return Err(SendError::DatagramTooLarge(buf.len()));
|
return Err(SendError::DatagramTooLarge(buf.len()));
|
||||||
}
|
}
|
||||||
let res = socket
|
socket
|
||||||
.send_to(&buf, addr)
|
.send_to(&buf, addr)
|
||||||
.map_err(|e| SendError::SendError(e))
|
.map_err(|e| SendError::SendError(e))
|
||||||
.map(|_| ());
|
.map(|_| ())
|
||||||
if let Ok(_) = res {
|
|
||||||
println!("Sent: {:?}", package);
|
|
||||||
}
|
|
||||||
res
|
|
||||||
} else {
|
} else {
|
||||||
Err(SendError::SocketDisconnected)
|
Err(SendError::SocketDisconnected)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,6 @@ impl Listener {
|
|||||||
let mut ciborium_buf: Datagram = [0; _];
|
let mut ciborium_buf: Datagram = [0; _];
|
||||||
let bytes = Cursor::new(&mut buffer[..num_bytes]);
|
let bytes = Cursor::new(&mut buffer[..num_bytes]);
|
||||||
let res = ciborium::from_reader_with_buffer::<Package, _>(bytes, &mut ciborium_buf);
|
let res = ciborium::from_reader_with_buffer::<Package, _>(bytes, &mut ciborium_buf);
|
||||||
println!("Received: {:?}", res);
|
|
||||||
match res {
|
match res {
|
||||||
Ok(pkg) => self.sender.send(ListenerMessage::Package(pkg, from_addr)),
|
Ok(pkg) => self.sender.send(ListenerMessage::Package(pkg, from_addr)),
|
||||||
Err(_) => self.sender.send(ListenerMessage::PackageError(
|
Err(_) => self.sender.send(ListenerMessage::PackageError(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user