make conn a pointer again

This commit is contained in:
rubyist 2013-11-03 13:41:56 -05:00
parent 1d3eeaacf9
commit c846d177f2

View File

@ -63,7 +63,7 @@ type conn struct {
once sync.Once once sync.Once
} }
func (c conn) Close() error { func (c *conn) Close() error {
c.once.Do(func() { c.wg.Done() }) c.once.Do(func() { c.wg.Done() })
return c.Conn.Close() return c.Conn.Close()
} }
@ -134,7 +134,7 @@ func (l *listener) Accept() (net.Conn, error) {
} }
return nil, err return nil, err
} }
return conn{Conn: c, wg: &l.wg}, nil return &conn{Conn: c, wg: &l.wg}, nil
} }
type Process struct { type Process struct {