diff --git a/lib/swarm.js b/lib/swarm.js index 283bdb2..1affa0e 100644 --- a/lib/swarm.js +++ b/lib/swarm.js @@ -42,7 +42,8 @@ Swarm.prototype._onAnnounce_started = function (params, peer) { peer = this.peers[params.addr] = { ip: params.ip, port: params.port, - peerId: params.peer_id + peerId: params.peer_id, + complete: false } } diff --git a/test/server.js b/test/server.js index 24af0c1..f2aae5e 100644 --- a/test/server.js +++ b/test/server.js @@ -56,7 +56,8 @@ function serverTest (t, serverType, serverFamily) { t.deepEqual(server.getSwarm(infoHash).peers[clientAddr + ':6881'], { ip: clientIp, port: 6881, - peerId: peerId.toString('hex') + peerId: peerId.toString('hex'), + complete: false }) client.complete()