From 7a7ed575e1d7eda380075183690b709c30d2a05c Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Tue, 15 Mar 2016 20:06:53 -0700 Subject: [PATCH] check for params.offers to determine if offers were received --- server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index c33e834..c4791ec 100644 --- a/server.js +++ b/server.js @@ -353,8 +353,8 @@ Server.prototype._onWebSocketRequest = function (socket, opts, params) { socket.send(JSON.stringify(response), socket.onSend) debug('sent response %s to %s', JSON.stringify(response), params.peer_id) - if (params.numwant) { - debug('got offers %s from %s', JSON.stringify(params.offers), params.peer_id) + if (params.offers) { + debug('got offers %o from %s', params.offers, params.peer_id) debug('got %s peers from swarm %s', peers.length, params.info_hash) peers.forEach(function (peer, i) { peer.socket.send(JSON.stringify({