Commit b88ccaf
committed
Do not cache resolved inet address
Internally driver always uses `BoltServerAddress` to represent host
and port. These addresses are constructed from the initial driver
URI and from routing procedure output in routing driver. Bolt address
is only resolved to an `InetAddress` when new connection is established.
Resolved `InetSocketAddress` was cached in `BoltServerAddress` which
caused problems when corresponding DNS record changed. Driver would
then still try to connect to a cached stale `InetSocketAddress`.
This commit makes resolution happen on every connection.1 parent 22ad745 commit b88ccaf
File tree
2 files changed
+25
-9
lines changed- driver/src
- main/java/org/neo4j/driver/internal/net
- test/java/org/neo4j/driver/internal/net
2 files changed
+25
-9
lines changedLines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
106 | 113 | | |
107 | 114 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 115 | + | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
119 | | - | |
| 122 | + | |
| 123 | + | |
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
| |||
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
0 commit comments