use defer in conn.Close

This commit is contained in:
Naitik Shah 2013-10-06 10:54:16 -07:00
parent e3a666a3f1
commit 220ebb1f4f

View File

@ -58,9 +58,8 @@ type conn struct {
} }
func (c conn) Close() error { func (c conn) Close() error {
err := c.Conn.Close() defer c.wg.Done()
c.wg.Done() return c.Conn.Close()
return err
} }
// Wraps an existing File listener to provide a graceful Close() process. // Wraps an existing File listener to provide a graceful Close() process.