mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-06-11 03:11:39 +00:00
Makes callback optional on close.
This commit is contained in:
@ -68,7 +68,7 @@ function TCP () {
|
||||
var count = 0
|
||||
listeners.forEach((listener) => {
|
||||
listener.close(() => {
|
||||
if (++count === listeners.length) {
|
||||
if (++count === listeners.length && callback) {
|
||||
callback()
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user