Skip to content
This repository was archived by the owner on Aug 23, 2019. It is now read-only.

Commit 4de013d

Browse files
victorbdaviddias
authored andcommitted
fix(hangup): change order of listen for close and ending muxer (#163)
1 parent c82d0e8 commit 4de013d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ function Swarm (peerInfo) {
114114
const key = peerInfo.id.toB58String()
115115
if (this.muxedConns[key]) {
116116
const muxer = this.muxedConns[key].muxer
117-
muxer.end()
118117
muxer.once('close', () => {
119118
delete this.muxedConns[key]
120119
callback()
121120
})
121+
muxer.end()
122122
} else {
123123
callback()
124124
}

0 commit comments

Comments
 (0)