Skip to content

Commit b9639fa

Browse files
authored
Merge pull request #2963 from lifenjoiner/log
2 parents e32fd47 + 128c577 commit b9639fa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dnscrypt-proxy/plugin_query_log.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,10 @@ func (plugin *PluginQueryLog) Eval(pluginsState *PluginsState, msg *dns.Msg) err
8585
}
8686

8787
// Cap at timeout to handle system sleep/suspend
88-
if requestDuration > pluginsState.timeout {
89-
requestDuration = pluginsState.timeout
88+
// Max: UDP + TCP, Dial + (write + read)
89+
triedUDPTCPTimeout := 4 * pluginsState.timeout
90+
if requestDuration > triedUDPTCPTimeout {
91+
requestDuration = triedUDPTCPTimeout
9092
}
9193
var line string
9294
if plugin.format == "tsv" {

0 commit comments

Comments
 (0)