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