mirror of https://github.com/gorilla/websocket.git
delete buffer on connection close
Explicitly nil connection buffer on connection close.
This commit is contained in:
parent
66b9c49e59
commit
fa1ab72649
2
conn.go
2
conn.go
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue