Skip to content

Commit

Permalink
Fix unnecessary Incoming warning on Endpoint drop
Browse files Browse the repository at this point in the history
  • Loading branch information
gretchenfrage authored and Ralith committed Jun 30, 2024
1 parent c445e9b commit 715416a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions quinn/src/endpoint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,14 @@ impl State {
}
}

impl Drop for State {
fn drop(&mut self) {
for incoming in self.recv_state.incoming.drain(..) {
self.inner.ignore(incoming);
}
}
}

fn respond(transmit: proto::Transmit, response_buffer: &[u8], socket: &dyn AsyncUdpSocket) {
// Send if there's kernel buffer space; otherwise, drop it
//
Expand Down

0 comments on commit 715416a

Please sign in to comment.