ignore error when counting closed connections
This commit is contained in:
@@ -66,11 +66,8 @@ func (c *Conn) Write(b []byte) (count int, e error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) Close() error {
|
func (c *Conn) Close() error {
|
||||||
err := c.Conn.Close()
|
stats.ConnectionClose()
|
||||||
if err == nil {
|
return c.Conn.Close()
|
||||||
stats.ConnectionClose()
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewListener(addr string, timeout time.Duration) (net.Listener, error) {
|
func NewListener(addr string, timeout time.Duration) (net.Listener, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user