INNER CODE UNIT · JavaScript
destroySoon
feross/simple-peer · index.js:582
const destroySoon = () => {
setTimeout(() => this.destroy(), 1000)
}
if (this._connected) {
destroySoon()
} else {
this.once('connect', destroySoon)
}
}
_startIceCompleteTimeout () {
if (this.destroyed) return
if (this._iceCompleteTimer) return
this._debug('started iceComplete timeout')
this._iceCompleteTimer = setTimeout(() => {
if (!this._iceComplete) {
this._iceComplete = true