Files
mihomo/dns
Abhijeet Chugh 5807ee08fd fix: forget in-flight dns lookups on ResetConnection (#3533)
A lookup that starts while the old network is going away (for example
Wi-Fi dropping on Android) can be sent to servers that will never
answer. It runs on its own DefaultDNSTimeout inside the singleflight
group, and every later request for the same name joins it, even after
the platform has signalled the network change (Clash Meta for Android
calls ClearCache and ResetConnection on every DNS change). So all
requests for that name fail together when the stale lookup times out.

Reset the singleflight group both before and after resetting the
clients. Before, so requests made while a client reset is blocked
(DoH's ResetConnection waits for clientMu) start a fresh lookup instead
of joining one stuck on the old network. After, so requests made once
ResetConnection returns do not join a lookup that started during the
reset on a connection from before the change.
2026-11-29 08:52:49 +08:00
..
2024-06-15 13:32:57 +08:00
2026-09-11 09:41:09 +08:00