Skip to content

Commit a3f2e49

Browse files
authored
Merge pull request #3026 from lifenjoiner/workload
Show number of goroutines if reaches max clients
2 parents 84ee7b3 + 1f8a725 commit a3f2e49

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dnscrypt-proxy/proxy.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ func (proxy *Proxy) udpListener(clientPc *net.UDPConn) {
442442
packet := buffer[:length]
443443
if !proxy.clientsCountInc() {
444444
dlog.Warnf("Too many incoming connections (max=%d)", proxy.maxClients)
445+
dlog.Debugf("Number of goroutines: %d", runtime.NumGoroutine())
445446
proxy.processIncomingQuery(
446447
"udp",
447448
proxy.mainProto,
@@ -469,6 +470,7 @@ func (proxy *Proxy) tcpListener(acceptPc *net.TCPListener) {
469470
}
470471
if !proxy.clientsCountInc() {
471472
dlog.Warnf("Too many incoming connections (max=%d)", proxy.maxClients)
473+
dlog.Debugf("Number of goroutines: %d", runtime.NumGoroutine())
472474
clientPc.Close()
473475
continue
474476
}

0 commit comments

Comments
 (0)