Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
callback = function noop () {}
}
listener.io.emit('ss-leave')
setTimeout(() => {
listener.emit('close')
callback()
}, 100)
}
listener.getAddrs = (callback) => {
process.nextTick(() => {
callback(null, [maSelf])
})
}
listeners[multiaddr.toString()] = listener
return listener
}
})
return defer.promise
}
listener.close = () => {
listener.__connections.forEach(maConn => maConn.close())
listener.io && listener.io.emit('ss-leave')
listener.emit('close')
}
listener.getAddrs = () => {
return [WebRTCStar.maSelf]
}
WebRTCStar.listenersRefs[multiaddr.toString()] = listener
return listener
}