Commit c036b99
authored
DnsNameResolver: allow users to skip bind() during bootstrap (#14375)
Motivation:
We prefer to bind by default for better debug logging (see #13817).
However, some users expressed concerns with this behavior change because
it eagerly binds a UDP port even when allocated resolver is not used.
Modifications:
- Keep default behavior to bind, but allow configuring `null` for
`DnsNameResolverBuilder.localAddress(...)` to preserve pre-existing
behavior.
Result:
Users can force pre-existing behavior of lazy port binding on resolve.1 parent 56a9101 commit c036b99
2 files changed
Lines changed: 9 additions & 4 deletions
File tree
- resolver-dns/src/main/java/io/netty/resolver/dns
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
| |||
501 | 502 | | |
502 | 503 | | |
503 | 504 | | |
| 505 | + | |
504 | 506 | | |
505 | | - | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
506 | 511 | | |
507 | | - | |
508 | | - | |
509 | 512 | | |
510 | 513 | | |
511 | 514 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
55 | | - | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
0 commit comments