Skip to content

Conversation

@BigWingBeat
Copy link
Contributor

This PR replaces Quinn's use of Async::new with Async::new_nonblocking, a constructor introduced in version 2.0 of async_io, which assumes the socket has already been put into non-blocking mode. For Quinn this is indeed the case, as quinn_udp configures the socket as non-blocking already.

As for the Tokio runtime implementation, that uses UdpSocket::from_std, which already makes this assumption.

Copy link
Member

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks! I am curious how this helps your use case?

@BigWingBeat
Copy link
Contributor Author

This wasn't motivated by a particular use-case, it's just a redundancy with a trival fix I noticed while looking at the code.

Copy link
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@Ralith Ralith added this pull request to the merge queue Dec 6, 2024
Merged via the queue into quinn-rs:main with commit 728a335 Dec 6, 2024
18 checks passed
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.

3 participants