delete buffer on connection close

Explicitly nil connection buffer on connection close.
This commit is contained in:
jameselder987 2018-09-10 22:56:40 +05:30 committed by GitHub
parent 66b9c49e59
commit fa1ab72649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -328,6 +328,8 @@ func (c *Conn) Subprotocol() string {
// Close closes the underlying network connection without sending or waiting // Close closes the underlying network connection without sending or waiting
// for a close message. // for a close message.
func (c *Conn) Close() error { func (c *Conn) Close() error {
c.br = nil
c.writeBuf = nil
return c.conn.Close() return c.conn.Close()
} }