mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-09-15 21:00:27 +00:00
Improve network reset
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user