From 9b61964b71495c3af15b91d301eda7470bfd5de1 Mon Sep 17 00:00:00 2001 From: Rishichandra Wawhal Date: Tue, 24 Jul 2018 15:22:47 +0530 Subject: [PATCH] retry websocket connection on failure (fix #198) (#200) --- console/src/components/ApiExplorer/Actions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console/src/components/ApiExplorer/Actions.js b/console/src/components/ApiExplorer/Actions.js index d228a0c72d9..08131de6bdb 100644 --- a/console/src/components/ApiExplorer/Actions.js +++ b/console/src/components/ApiExplorer/Actions.js @@ -177,7 +177,6 @@ const createWsClient = (url, headers) => { websocketProtocol = 'wss'; } const headersFinal = getHeadersAsJSON(headers); - setTimeout(() => null, 500); const graphqlUrl = `${websocketProtocol}://${url.split('//')[1]}`; const client = new SubscriptionClient(graphqlUrl, { connectionParams: { @@ -185,6 +184,7 @@ const createWsClient = (url, headers) => { ...headersFinal, }, }, + reconnect: true, }); return client; };