mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 20:52:15 +08:00
Fix: incorrect fake ip dns ttl (#187)
This commit is contained in:
parent
e837470a6a
commit
a4b8e286db
@ -60,6 +60,7 @@ func (s *Server) handleFakeIP(r *D.Msg) (msg *D.Msg, err error) {
|
||||
cache := s.r.cache.Get("fakeip:" + q.String())
|
||||
if cache != nil {
|
||||
msg = cache.(*D.Msg).Copy()
|
||||
setMsgTTL(msg, 1)
|
||||
return
|
||||
}
|
||||
|
||||
@ -72,7 +73,6 @@ func (s *Server) handleFakeIP(r *D.Msg) (msg *D.Msg, err error) {
|
||||
putMsgToCache(s.r.cache, "fakeip:"+q.String(), msg)
|
||||
putMsgToCache(s.r.cache, ip.String(), msg)
|
||||
|
||||
// putMsgToCache depend on msg ttl to set cache expired time, then set msg ref ttl to 1
|
||||
setMsgTTL(msg, 1)
|
||||
}()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user