From 2714b09e5d0cb6e1d41671b59e539ce9a4498ca8 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Fri, 26 Jul 2019 18:51:16 +0200 Subject: [PATCH] Fix wrong argument order Fix compression not applying because the order of the callback and options arguments were swapped in the call to Needle.get for the request_cluster_data function. --- sharedPlugins/researchSync/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharedPlugins/researchSync/index.js b/sharedPlugins/researchSync/index.js index 33b267ec..395e885a 100644 --- a/sharedPlugins/researchSync/index.js +++ b/sharedPlugins/researchSync/index.js @@ -128,7 +128,7 @@ class ResearchSync { request_cluster_data() { const slaves_data_url = `${this.config.masterIP}:${this.config.masterPort}/api/slaves` - needle.get(slaves_data_url, this.sync_researches.bind(this), {compressed:true}) + needle.get(slaves_data_url, {compressed:true}, this.sync_researches.bind(this)) } sync_researches(err, resp, slaves_data) {