From 649fefad547377afe4dff6cd4b5e7cfca273353f Mon Sep 17 00:00:00 2001 From: yflory Date: Fri, 16 Feb 2018 15:25:53 +0100 Subject: [PATCH] Send cookie when history keeper has changed --- www/common/rpc.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/www/common/rpc.js b/www/common/rpc.js index bcbc98662..7c5012592 100644 --- a/www/common/rpc.js +++ b/www/common/rpc.js @@ -217,6 +217,15 @@ types of messages: }); }); + if (network.onHistoryKeeperChange) { + network.onHistoryKeeperChange(function () { + send('COOKIE', "", function (e) { + if (e) { return void cb(e); } + ctx.connected = true; + }); + }); + } + send('COOKIE', "", function (e) { if (e) { return void cb(e); } // callback to provide 'send' method to whatever needs it