mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-03-30 15:31:22 +00:00
fix .destroy
This commit is contained in:
parent
1e4182691a
commit
a6da1000f5
@ -47,12 +47,7 @@ function Connection (conn) {
|
||||
this.setWritable(conn)
|
||||
}
|
||||
|
||||
this.destroy = () => {
|
||||
if (conn.destroy) {
|
||||
conn.destroy()
|
||||
}
|
||||
this.end()
|
||||
}
|
||||
// .destroy is implemented by Duplexify
|
||||
|
||||
if (conn) {
|
||||
this.setInnerConn(conn)
|
||||
|
Loading…
x
Reference in New Issue
Block a user