Skip to content

Commit 4fd125c

Browse files
committed
Call updateMonitoringMetrics in ApplyLoggingPlugins
Keep both results the same.
1 parent 5c5b44c commit 4fd125c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

dnscrypt-proxy/plugins.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ type PluginsState struct {
7676
synthResponse *dns.Msg
7777
questionMsg *dns.Msg
7878
xTransport *XTransport
79+
proxy *Proxy
7980
sessionData map[string]interface{}
8081
action PluginsAction
8182
timeout time.Duration
@@ -269,6 +270,7 @@ func NewPluginsState(
269270
maxUnencryptedUDPSafePayloadSize: MaxDNSUDPSafePacketSize,
270271
sessionData: make(map[string]interface{}),
271272
xTransport: proxy.xTransport,
273+
proxy: proxy,
272274
}
273275
}
274276

@@ -403,5 +405,7 @@ func (pluginsState *PluginsState) ApplyLoggingPlugins(pluginsGlobals *PluginsGlo
403405
return err
404406
}
405407
}
408+
// Update monitoring metrics
409+
updateMonitoringMetrics(pluginsState.proxy, pluginsState)
406410
return nil
407411
}

dnscrypt-proxy/proxy.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -818,9 +818,6 @@ func (proxy *Proxy) processIncomingQuery(
818818
// Apply logging plugins
819819
pluginsState.ApplyLoggingPlugins(&proxy.pluginsGlobals)
820820

821-
// Update monitoring metrics
822-
updateMonitoringMetrics(proxy, &pluginsState)
823-
824821
return response
825822
}
826823

0 commit comments

Comments
 (0)