mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-04-25 13:42:17 +00:00
Makes callback optional on close.
This commit is contained in:
parent
c456326515
commit
b43f6ffb6f
@ -68,7 +68,7 @@ function TCP () {
|
||||
var count = 0
|
||||
listeners.forEach((listener) => {
|
||||
listener.close(() => {
|
||||
if (++count === listeners.length) {
|
||||
if (++count === listeners.length && callback) {
|
||||
callback()
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user