mirror of
https://github.com/ferdzo/fs.git
synced 2026-04-05 08:26:28 +00:00
Minimal fixes for metrics
This commit is contained in:
@@ -661,13 +661,12 @@ func (l *limitedListener) Accept() (net.Conn, error) {
|
||||
l.slots <- struct{}{}
|
||||
metrics.Default.DecRequestQueueLength()
|
||||
}
|
||||
metrics.Default.IncConnectionPoolActive()
|
||||
conn, err := l.Listener.Accept()
|
||||
if err != nil {
|
||||
<-l.slots
|
||||
metrics.Default.DecConnectionPoolActive()
|
||||
return nil, err
|
||||
}
|
||||
metrics.Default.IncConnectionPoolActive()
|
||||
return &limitedConn{
|
||||
Conn: conn,
|
||||
done: func() {
|
||||
|
||||
Reference in New Issue
Block a user