From 1afeb7900ea07bace0ac099457b779b669f5cd5f Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 27 Oct 2020 10:47:30 -0500 Subject: [PATCH] Increasing timeout, removing isomporphic-ws --- package.json | 1 - src/shared/services/WebSocketService.ts | 4 +--- yarn.lock | 5 ----- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/package.json b/package.json index dc808a6e..433f54c8 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "inferno-router": "^7.4.6", "inferno-server": "^7.4.6", "isomorphic-cookie": "^1.2.4", - "isomorphic-ws": "^4.0.1", "jwt-decode": "^3.0.0", "markdown-it": "^12.0.2", "markdown-it-container": "^3.0.0", diff --git a/src/shared/services/WebSocketService.ts b/src/shared/services/WebSocketService.ts index 634a9b7c..0baf9b62 100644 --- a/src/shared/services/WebSocketService.ts +++ b/src/shared/services/WebSocketService.ts @@ -63,7 +63,6 @@ import { i18n } from '../i18next'; import { toast, isBrowser } from '../utils'; import { Observable } from 'rxjs'; import { share } from 'rxjs/operators'; -import WebSocket from 'isomorphic-ws'; import { Options as WSOptions, default as ReconnectingWebSocket, @@ -73,8 +72,7 @@ export class WebSocketService { private static _instance: WebSocketService; public ws: ReconnectingWebSocket; public wsOptions: WSOptions = { - WebSocket: WebSocket, - connectionTimeout: 1000, + connectionTimeout: 5000, maxRetries: 10, }; public subject: Observable; diff --git a/yarn.lock b/yarn.lock index 70cd47f1..27bd358e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5254,11 +5254,6 @@ isomorphic-cookie@^1.2.4: cookie "^0.1.2" lodash.pick "^4.4.0" -isomorphic-ws@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz#55fd4cd6c5e6491e76dc125938dd863f5cd4f2dc" - integrity sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w== - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"