From 23b077b76f0548dfcd86f671e863aeda9968c755 Mon Sep 17 00:00:00 2001 From: Romain Beaumont <romain.rom1@gmail.com> Date: Sat, 7 Nov 2015 01:25:12 +0100 Subject: [PATCH] fix compression in proxy, fix #292 --- examples/proxy/proxy.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/proxy/proxy.js b/examples/proxy/proxy.js index 2aa22b5..d5baf4e 100644 --- a/examples/proxy/proxy.js +++ b/examples/proxy/proxy.js @@ -122,10 +122,11 @@ srv.on('login', function(client) { targetClient.state + "." + meta.name + " :" + JSON.stringify(data)); } - if(!endedClient) + if(!endedClient) { client.write(meta.name, data); - if (meta.name === 'set_compression' || meta.name === 'compression') // Set compression - client.compressionThreshold = data.threshold; + if (meta.name === 'set_compression') // Set compression + client.compressionThreshold = data.threshold; + } } }); var bufferEqual = require('buffer-equal');