Commit 0ef7d6f
fix(dns): use the port holder enable said it would use
Preflight finds a bridge this run did not start, asks it the clearnet
question, and on a good answer prints that it "is being used as-is".
Then `enable` started a second daemon anyway.
`startDaemon` decides "already running" from our own pidfile, so a
holder it did not record is invisible to it. Both bridges then bind --
the socket is created with reuseAddr -- and the kernel hands the query
to whichever took the more specific address. On the machine that found
this, ours took 127.0.0.1 while the holder had 0.0.0.0, so the bridge
the note promised would serve was the one receiving nothing.
`holderForwards` was computed, returned and printed, and never read
again before the start. This gates the start on it.
The existing test was already named for this -- "a holder that forwards
is used, not refused" -- and only asserted the note was printed, which
is why the second daemon went unnoticed. It now asserts the bridge is
not started, and a new test covers the other half: a holder that fails
the clearnet question is the stale-bridge case, so --force past it must
still start ours.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 49239a2 commit 0ef7d6f
2 files changed
Lines changed: 54 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2312 | 2312 | | |
2313 | 2313 | | |
2314 | 2314 | | |
2315 | | - | |
2316 | | - | |
2317 | | - | |
2318 | | - | |
| 2315 | + | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
| 2324 | + | |
| 2325 | + | |
| 2326 | + | |
| 2327 | + | |
| 2328 | + | |
| 2329 | + | |
| 2330 | + | |
| 2331 | + | |
| 2332 | + | |
2319 | 2333 | | |
2320 | 2334 | | |
2321 | 2335 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| 122 | + | |
121 | 123 | | |
122 | 124 | | |
123 | 125 | | |
124 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
125 | 160 | | |
126 | 161 | | |
127 | 162 | | |
| |||
0 commit comments