From 2fffdc6730bf497044e3401c5b6e2edc5b9e9312 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 23 Mar 2016 21:27:32 -0700 Subject: [PATCH] ws server: drop support for old tracker clients MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit old clients don’t send params.action === ‘action’ --- lib/server/parse-websocket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/server/parse-websocket.js b/lib/server/parse-websocket.js index 720639e..0db50b5 100644 --- a/lib/server/parse-websocket.js +++ b/lib/server/parse-websocket.js @@ -8,7 +8,7 @@ function parseWebSocketRequest (socket, opts, params) { params.type = 'ws' params.socket = socket - if (params.action === 'announce' || params.offers || params.answer) { + if (params.action === 'announce') { params.action = common.ACTIONS.ANNOUNCE if (typeof params.info_hash !== 'string' || params.info_hash.length !== 20) {