diff --git a/grace.go b/grace.go index befcfed..c4eaa9b 100644 --- a/grace.go +++ b/grace.go @@ -64,7 +64,7 @@ type conn struct { } func (c *conn) Close() error { - c.once.Do(func() { c.wg.Done() }) + c.once.Do(func() { defer c.wg.Done() }) return c.Conn.Close() }