Skip to content

Commit 46d03c0

Browse files
committed
Minor tweaks over #59
1 parent 211a43a commit 46d03c0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ If your machine has a standard IP networking setup, the `Generators.egressTimeBa
7777
factory method will try to determine which network interface corresponds to the default route for
7878
all outgoing network traffic, and use that for creating a time based generator.
7979
This is likely a good choice for common usage scenarios if you want a version 1 UUID generator, but unfortunately
80-
is known not to work reliably on some platforms.
80+
is known not to work reliably on some platforms (MacOS seems to have some issues).
8181

8282
```java
8383
TimeBasedGenerator gen = Generators.egressTimeBasedGenerator();

src/main/java/com/fasterxml/uuid/EthernetAddress.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,9 @@ public static EthernetAddress fromEgressInterface()
325325
String roots = "abcdefghijklm";
326326
int index = new Random().nextInt(roots.length());
327327
String name = roots.charAt(index) + ".root-servers.net";
328+
// Specify standard/default port DNS uses; more robust on some platforms
329+
// (MacOS/JDK 17), see:
330+
// https://github.com/cowtowncoder/java-uuid-generator/pull/59
328331
InetSocketAddress externalAddress = new InetSocketAddress(name, 53);
329332
if (externalAddress.isUnresolved()) {
330333
externalAddress = new InetSocketAddress("1.1.1.1", 0);

0 commit comments

Comments
 (0)