Improve network reset

This commit is contained in:
世界
2026-08-30 17:41:43 +08:00
parent 3afd290278
commit e4c8b49eaf
26 changed files with 250 additions and 62 deletions
+3
View File
@@ -44,6 +44,9 @@ func (s *platformSearcher) FindProcessInfo(ctx context.Context, network string,
return s.platform.FindConnectionOwner(request)
}
func (s *platformSearcher) ResetCache() {
}
func (s *platformSearcher) Close() error {
return nil
}
+6
View File
@@ -288,4 +288,10 @@ func (r *Router) NeighborResolver() adapter.NeighborResolver {
func (r *Router) ResetNetwork() {
r.httpClientManager.ResetNetwork()
r.dns.ResetNetwork()
if r.processCache != nil {
r.processCache.Purge()
}
if r.processSearcher != nil {
r.processSearcher.ResetCache()
}
}