From fa1ab72649bf5f6b825e74ab3ca7c62731698a29 Mon Sep 17 00:00:00 2001 From: jameselder987 <43148082+jameselder987@users.noreply.github.com> Date: Mon, 10 Sep 2018 22:56:40 +0530 Subject: [PATCH] delete buffer on connection close Explicitly nil connection buffer on connection close. --- conn.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/conn.go b/conn.go index d2a21c1..4ecdfb6 100644 --- a/conn.go +++ b/conn.go @@ -328,6 +328,8 @@ func (c *Conn) Subprotocol() string { // Close closes the underlying network connection without sending or waiting // for a close message. func (c *Conn) Close() error { + c.br = nil + c.writeBuf = nil return c.conn.Close() }