Skip to content

Commit 785e7be

Browse files
小调整。
1 parent a141c9e commit 785e7be

File tree

1 file changed

+2
-2
lines changed
  • packages/mitmproxy/src/lib/dns

1 file changed

+2
-2
lines changed

packages/mitmproxy/src/lib/dns/base.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ module.exports = class BaseDNS {
165165
const timeout = 6000
166166
const timeoutId = setTimeout(() => {
167167
if (!isOver) {
168-
log.error(`[DNS-over-${this.dnsType} '${this.dnsName}'] DNS查询超时, hostname: ${hostname}, type: ${type}, ${this.dnsServer ? `, dnsServer: ${this.dnsServer}` : ''}${this.dnsServerPort ? `:${this.dnsServerPort}` : ''}, cost: ${Date.now() - start} ms`)
168+
log.error(`[DNS-over-${this.dnsType} '${this.dnsName}'] DNS查询超时, hostname: ${hostname}, type: ${type}${this.dnsServer ? `, dnsServer: ${this.dnsServer}` : ''}${this.dnsServerPort ? `:${this.dnsServerPort}` : ''}, cost: ${Date.now() - start} ms`)
169169
reject(new Error('DNS查询超时'))
170170
}
171171
}, timeout)
@@ -181,7 +181,7 @@ module.exports = class BaseDNS {
181181
isOver = true
182182
clearTimeout(timeoutId)
183183
if (e.message === 'DNS查询超时') {
184-
log.error(`[DNS-over-${this.dnsType} '${this.dnsName}'] DNS查询超时. hostname: ${hostname}, type: ${type}, ${this.dnsServer ? `, dnsServer: ${this.dnsServer}` : ''}${this.dnsServerPort ? `:${this.dnsServerPort}` : ''}, cost: ${Date.now() - start} ms`)
184+
log.error(`[DNS-over-${this.dnsType} '${this.dnsName}'] DNS查询超时. hostname: ${hostname}, type: ${type}${this.dnsServer ? `, dnsServer: ${this.dnsServer}` : ''}${this.dnsServerPort ? `:${this.dnsServerPort}` : ''}, cost: ${Date.now() - start} ms`)
185185
} else {
186186
log.error(`[DNS-over-${this.dnsType} '${this.dnsName}'] DNS查询错误, hostname: ${hostname}, type: ${type}${this.dnsServer ? `, dnsServer: ${this.dnsServer}` : ''}${this.dnsServerPort ? `:${this.dnsServerPort}` : ''}, cost: ${Date.now() - start} ms, error:`, e)
187187
}

0 commit comments

Comments
 (0)