mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-04 00:53:19 +02:00
brontide: address old TODO to reset the brontide state
In this commit, we address a suuuper old TODO to reset the brontide state. We were allocating a read buf which we now set to nil, and we free up the original brontide reference.
This commit is contained in:
@@ -234,7 +234,10 @@ func (c *Conn) Flush() (int, error) {
|
||||
//
|
||||
// Part of the net.Conn interface.
|
||||
func (c *Conn) Close() error {
|
||||
// TODO(roasbeef): reset brontide state?
|
||||
// Clear the state we created to be able to handle this connection.
|
||||
c.noise = nil
|
||||
c.readBuf = bytes.Buffer{}
|
||||
|
||||
return c.conn.Close()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user