chore: apply suggestions from code review

Co-Authored-By: Vasco Santos <vasco.santos@moxy.studio>
Co-Authored-By: Alan Shaw <alan.shaw@protocol.ai>
This commit is contained in:
Jacob Heun
2019-12-04 13:53:32 +01:00
parent 76ec1ccd21
commit 2788982c53
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ class DialRequest {
// For every token, run a multiaddr dial
// If there are tokens left, release them
// If there are multiaddrs left, wait for tokens to finish
const th = new TokenHolder(tokens, this.dialer.releaseToken)
const th = new TokenHolder(tokens, t => this.dialer.releaseToken(t))
// Create the dial functions
const dials = this.addrs.map(addr => {
@ -76,7 +76,7 @@ class DialRequest {
* @param {Multiaddr} addr
* @param {object} options
* @param {AbortSignal} options.signal An AbortController signal
* @param {number} options.timeout The max dial time for each request
* @param {number} options.timeout The max dial time for each request in ms
* @returns {{abort: function(), promise: Promise<Connection>}} An AbortableDial
*/
_abortableDial (addr, options) {