File tree Expand file tree Collapse file tree
app/src/main/java/io/nekohasekai/sagernet/bg/proto Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -294,7 +294,16 @@ abstract class BoxInstance(
294294 if (pending.isNotEmpty()) delay(50 )
295295 }
296296 if (pending.isNotEmpty()) {
297- throw IOException (" sidecar listener not ready on port(s): ${pending.joinToString()} " )
297+ // MasterDnsVPN must have its listener up before the first dial (it crashed
298+ // otherwise), so a timeout there is fatal. Other sidecars (Mieru/Naïve/
299+ // TrojanGo/Hysteria) were historically fire-and-forget: the first sing-box
300+ // dial retries, so a slow bind shouldn't hard-fail VPN start — log and continue.
301+ val message = " sidecar listener not ready on port(s): ${pending.joinToString()} "
302+ if (hasMasterDnsVpn) {
303+ throw IOException (message)
304+ } else {
305+ Logs .w(" $message ; continuing (sing-box will retry the connection)" )
306+ }
298307 }
299308 }
300309 }
You can’t perform that action at this time.
0 commit comments