From 30c7309d9b9e9394ed2019624afdd826934e1beb Mon Sep 17 00:00:00 2001 From: John Swanson Date: Wed, 4 May 2016 13:51:44 -0700 Subject: [PATCH] Reconnect when token changes on successful connection If the websocket connection succeeds, but the token is wrong, changing the token in the UI did not succeed (because we are already connected and nothing was triggering a reconnect attempt with the new config). --- js/services/rpc/rpc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/services/rpc/rpc.js b/js/services/rpc/rpc.js index 851b0a9..1b0bc2a 100644 --- a/js/services/rpc/rpc.js +++ b/js/services/rpc/rpc.js @@ -122,6 +122,7 @@ function(syscall, globalTimeout, alerts, utils, rootScope, uri, authconf, filter }); if (failed) { + needNewConnection = true; alerts.addAlert('Oh Snap! Authentication failed while connecting to Aria2 RPC server. Will retry in 10 secs. You might want to confirm your authentication details by going to Settings > Connection Settings', 'error'); timeout = setTimeout(update, globalTimeout); return;