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