Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: drop UDP packets instead of panicking #102

Merged
merged 2 commits into from
Mar 13, 2023
Merged

Conversation

camshaft
Copy link
Collaborator

Description

We currently panic when a UDP socket's buffer is full. To better emulate networks, this change drops the packets and logs a tracing message.

Testing

I've also added a bulk_transfer test to measure the behavior of sending packets faster than the peer can read them.

@mcches mcches merged commit 2e3d2d3 into tokio-rs:main Mar 13, 2023
@camshaft camshaft deleted the udp-drop branch March 13, 2023 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants