Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Update reconnecting-websocket to latest version #6512

Merged
merged 1 commit into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-virtualized": "^9.20.0",
"reconnecting-websocket": "^3.0.7",
"reconnecting-websocket": "^4.2.0",
"reflect-metadata": "^0.1.10",
"route-parser": "^0.0.5",
"vscode-languageserver-types": "^3.15.0-next",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/browser/messaging/ws-connection-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { createWebSocketConnection, Logger, ConsoleLogger } from 'vscode-ws-json
import { ConnectionHandler, JsonRpcProxyFactory, JsonRpcProxy, Emitter, Event } from '../../common';
import { WebSocketChannel } from '../../common/messaging/web-socket-channel';
import { Endpoint } from '../endpoint';
const ReconnectingWebSocket = require('reconnecting-websocket');
import ReconnectingWebSocket from 'reconnecting-websocket';

decorate(injectable(), JsonRpcProxyFactory);
decorate(unmanaged(), JsonRpcProxyFactory, 0);
Expand Down Expand Up @@ -52,7 +52,7 @@ export class WebSocketConnectionProvider {
}

protected channelIdSeq = 0;
protected readonly socket: WebSocket;
protected readonly socket: ReconnectingWebSocket;
protected readonly channels = new Map<number, WebSocketChannel>();

protected readonly onIncomingMessageActivityEmitter: Emitter<void> = new Emitter();
Expand Down Expand Up @@ -166,7 +166,7 @@ export class WebSocketConnectionProvider {
/**
* Creates a web socket for the given url
*/
protected createWebSocket(url: string): WebSocket {
protected createWebSocket(url: string): ReconnectingWebSocket {
return new ReconnectingWebSocket(url, undefined, {
maxReconnectionDelay: 10000,
minReconnectionDelay: 1000,
Expand Down
7 changes: 4 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9209,9 +9209,10 @@ rechoir@^0.6.2:
dependencies:
resolve "^1.1.6"

reconnecting-websocket@^3.0.7:
version "3.2.2"
resolved "https://registry.yarnpkg.com/reconnecting-websocket/-/reconnecting-websocket-3.2.2.tgz#8097514e926e9855e03c39e76efa2e3d1f371bee"
reconnecting-websocket@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/reconnecting-websocket/-/reconnecting-websocket-4.2.0.tgz#2395f84b5d0acee439ff5df34c3fd0853d11be7c"
integrity sha512-HMD8A0sv40xhkHf/T4qxktyOvHx7K3d2A9i1QG2wRIYdMecxQJMhTIBH4aQ8KfQLfQW4UOqNSfxTgv0C+MbPIA==

redent@^1.0.0:
version "1.0.0"
Expand Down