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