-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support IPV6_ADDR_PREFERENCES until Java 24 and beyond
While reflection on Java's internals is slowly being crippled, Unsafe access is still possible (at least until JEP 417 [0] reaches phase 3 in Java 26 or later). This requires moving from DatagramSocket to DatagramChannel as the former is substantially rewritten in Java 15 (JEP 373, see [1]) as a wrapper around the latter. The channel-based socket cannot be used in Java versions prior to 14 due to Java bug JDK-8232673 [2] which prevents read/write concurrency, effectively stalling the node. Tested on OpenJDK 8, 11, 17, 21, 23, and 24. Fixes bug 07217. [0] https://openjdk.org/jeps/471 [1] https://openjdk.org/jeps/373 [2] https://bugs.openjdk.org/browse/JDK-8232673
- Loading branch information
Showing
1 changed file
with
99 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters