~emersion/soju

bee2001e292859ad5e49428a57acdb3c2ff1a91a — Simon Ser 2 months ago cb99e97
Close net.Conn in conn.Close

Close the connection in conn.Close. This ensures the connection isn't
still alive after conn.Close, which would cause issues when
disconnecting and reconnecting quickly to an upstream server.
1 files changed, 2 insertions(+), 1 deletions(-)

M conn.go
M conn.go => conn.go +2 -1
@@ 84,9 84,10 @@ func (c *conn) Close() error {
		return fmt.Errorf("connection already closed")
	}

	err := c.net.Close()
	c.closed = true
	close(c.outgoing)
	return nil
	return err
}

func (c *conn) ReadMessage() (*irc.Message, error) {