mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-02-03 00:38:40 +08:00
chore(api/maxconnshandler): add tracing information to the log (#4126)
This commit is contained in:
parent
02dd81c05c
commit
9d551d507f
@ -23,7 +23,7 @@ func MaxConnsHandler(n int) func(http.Handler) http.Handler {
|
|||||||
if latch.TryBorrow() {
|
if latch.TryBorrow() {
|
||||||
defer func() {
|
defer func() {
|
||||||
if err := latch.Return(); err != nil {
|
if err := latch.Return(); err != nil {
|
||||||
logx.Error(err)
|
logx.WithContext(r.Context()).Error(err)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user