mirror of
https://github.com/fluencelabs/js-libp2p-interfaces
synced 2025-04-24 16:32:32 +00:00
fix: close streams on connection close
This commit is contained in:
parent
39af3ae7fa
commit
d7e113b3db
@ -209,6 +209,8 @@ class Connection {
|
||||
* @return {Promise<void>}
|
||||
*/
|
||||
async close () {
|
||||
this.streams.map(s => s.close && s.close())
|
||||
|
||||
if (this.stat.status === Status.CLOSED) {
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user