Skip to content

Commit

Permalink
fix: missing queue (libp2p#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw authored and jacobheun committed Apr 3, 2019
1 parent 9592c22 commit aeadc1b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dialer/queueManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const { DIAL_ABORTED } = require('../errors')
const nextTick = require('async/nextTick')
const retimer = require('retimer')
const { QUARTER_HOUR } = require('../constants')
const debug = require('debug')
const log = debug('libp2p:switch:dial:manager')
const noop = () => {}

class DialQueueManager {
Expand Down Expand Up @@ -154,6 +156,12 @@ class DialQueueManager {
}

let targetQueue = this._queues[nextQueue.value]

if (!targetQueue) {
log('missing queue %s, maybe it was aborted?', nextQueue.value)
return
}

this._dialingQueues.add(targetQueue.id)
targetQueue.start()
}
Expand Down

0 comments on commit aeadc1b

Please sign in to comment.