From c846d177f282d81b8578223cee4c7b48acfdd50b Mon Sep 17 00:00:00 2001 From: rubyist Date: Sun, 3 Nov 2013 13:41:56 -0500 Subject: [PATCH] make conn a pointer again --- grace.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grace.go b/grace.go index 7f205a1..befcfed 100644 --- a/grace.go +++ b/grace.go @@ -63,7 +63,7 @@ type conn struct { once sync.Once } -func (c conn) Close() error { +func (c *conn) Close() error { c.once.Do(func() { c.wg.Done() }) return c.Conn.Close() } @@ -134,7 +134,7 @@ func (l *listener) Accept() (net.Conn, error) { } return nil, err } - return conn{Conn: c, wg: &l.wg}, nil + return &conn{Conn: c, wg: &l.wg}, nil } type Process struct {