chore: cleanup the patch code

This commit is contained in:
wwqgtxx
2024-09-11 16:10:35 +08:00
parent 8230bc8e7d
commit 0a2f606e1b
18 changed files with 122 additions and 185 deletions

View File

@@ -6,7 +6,6 @@ import (
"net"
"github.com/metacubex/mihomo/common/sockopt"
"github.com/metacubex/mihomo/constant/features"
"github.com/metacubex/mihomo/context"
"github.com/metacubex/mihomo/log"
@@ -50,10 +49,6 @@ func (s *Server) SetHandler(handler handler) {
}
func ReCreateServer(addr string, resolver *Resolver, mapper *ResolverEnhancer) {
if features.CMFA {
UpdateIsolateHandler(resolver, mapper)
}
if addr == address && resolver != nil {
handler := NewHandler(resolver, mapper)
server.SetHandler(handler)