Skip to content
This repository has been archived by the owner on May 6, 2018. It is now read-only.

use modular async #15

Merged
merged 1 commit into from
Aug 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"homepage": "https://github.com/diasdavid/node-libp2p-kad-routing",
"dependencies": {
"async": "^1.4.0",
"async": "^2.0.1",
"buffer-xor": "^1.0.2",
"ipfs-logger": "^0.1.0",
"js-priority-queue": "^0.1.2",
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var KBucket = require('k-bucket')
var async = require('async')
var queue = require('async/queue')
var log = require('ipfs-logger').group('peer-routing ipfs-kad-router')
var protobufs = require('protocol-buffers-stream')
var fs = require('fs')
Expand Down Expand Up @@ -84,7 +84,7 @@ function KadRouter (peerSelf, swarmSelf, kBucketSize) {

var peerList = {} // < b58Id : Peer >

var q = async.queue(queryPeer, 1)
var q = queue(queryPeer, 1)

var closerPeers = self.kb.closest({
id: key, // key must be an Id object exported with .toBytes()
Expand Down