mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-01 22:56:41 +00:00
add some debug logs
This commit is contained in:
@@ -374,6 +374,8 @@ func (s *DefaultServer) buildUpstreamHandlerUpdate(nameServerGroups []*nbdns.Nam
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log.Debugf("received a nameserver group with %#v nameservers for %s domains", nsGroup.NameServers, nsGroup.Domains)
|
||||||
|
|
||||||
handler, err := newUpstreamResolver(
|
handler, err := newUpstreamResolver(
|
||||||
s.ctx,
|
s.ctx,
|
||||||
s.wgInterface.Name(),
|
s.wgInterface.Name(),
|
||||||
@@ -444,9 +446,11 @@ func (s *DefaultServer) updateMux(muxUpdates []muxUpdate) {
|
|||||||
var isContainRootUpdate bool
|
var isContainRootUpdate bool
|
||||||
|
|
||||||
for _, update := range muxUpdates {
|
for _, update := range muxUpdates {
|
||||||
|
log.Debugf("registering a new handler for domain %s", update.domain)
|
||||||
s.service.RegisterMux(update.domain, update.handler)
|
s.service.RegisterMux(update.domain, update.handler)
|
||||||
muxUpdateMap[update.domain] = update.handler
|
muxUpdateMap[update.domain] = update.handler
|
||||||
if existingHandler, ok := s.dnsMuxMap[update.domain]; ok {
|
if existingHandler, ok := s.dnsMuxMap[update.domain]; ok {
|
||||||
|
log.Debugf("stopping the existing handler for domain %s", update.domain)
|
||||||
existingHandler.stop()
|
existingHandler.stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,6 +466,7 @@ func (s *DefaultServer) updateMux(muxUpdates []muxUpdate) {
|
|||||||
s.addHostRootZone()
|
s.addHostRootZone()
|
||||||
existingHandler.stop()
|
existingHandler.stop()
|
||||||
} else {
|
} else {
|
||||||
|
log.Debugf("stopping the existing handler for domain %s", key)
|
||||||
existingHandler.stop()
|
existingHandler.stop()
|
||||||
s.service.DeregisterMux(key)
|
s.service.DeregisterMux(key)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user