mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-24 03:47:45 +08:00
conn: close fixes
This commit is contained in:
parent
c88a4b2ccc
commit
74a2f2b074
@ -58,11 +58,7 @@ func newSecureConn(ctx context.Context, sk ic.PrivKey, insecure Conn) (Conn, err
|
||||
}
|
||||
|
||||
func (c *secureConn) Close() error {
|
||||
if err := c.secure.Close(); err != nil {
|
||||
c.insecure.Close()
|
||||
return err
|
||||
}
|
||||
return c.insecure.Close()
|
||||
return c.secure.Close()
|
||||
}
|
||||
|
||||
// ID is an identifier unique to this connection.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user