mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-07 14:57:48 +02:00
fix possible connection counting error
This commit is contained in:
1 parent
88f1d32cc4
commit
06b81c063a
1 file changed
+5
-2
@@ -66,8 +66,11 @@ func (c *Conn) Write(b []byte) (count int, e error) {
|
||||
}
|
||||
|
||||
func (c *Conn) Close() error {
|
||||
stats.ConnectionClose()
|
||||
return c.Conn.Close()
|
||||
err := c.Conn.Close()
|
||||
if err == nil {
|
||||
stats.ConnectionClose()
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func NewListener(addr string, timeout time.Duration) (net.Listener, error) {
|
||||
|
||||
Reference in new issue
Block a user