udp: improve socket worker comments

This commit is contained in:
Joakim Frostegård 2022-10-25 02:16:16 +02:00
parent aa6be77a98
commit 15f8d30518

View file

@ -104,6 +104,7 @@ impl SocketWorker {
}
}
// If resend buffer is enabled, send any responses in it
if let Some(resend_buffer) = opt_resend_buffer.as_mut() {
for (response, addr) in resend_buffer.drain(..) {
Self::send_response(
@ -118,6 +119,7 @@ impl SocketWorker {
}
}
// Send any connect and error responses generated by this socket worker
for (response, addr) in local_responses.drain(..) {
Self::send_response(
&self.config,
@ -130,6 +132,7 @@ impl SocketWorker {
);
}
// Check channel for any responses generated by swarm workers
for (response, addr) in self.response_receiver.try_iter() {
let opt_response = match response {
ConnectedResponse::Scrape(r) => self