diff --git a/src/app/services/websocket.service.ts b/src/app/services/websocket.service.ts index 6f7495d..b3d5e4a 100644 --- a/src/app/services/websocket.service.ts +++ b/src/app/services/websocket.service.ts @@ -25,9 +25,6 @@ export class WebSocketService { return; } - // Using share() causes a single WebSocket to be created when the first - // observer subscribes. This socket is shared with subsequent observers - // and closed when the observer count falls to zero. const wsproto = (location.protocol === 'https:') ? 'wss://' : 'ws://'; this.downlink = jsonWebsocketConnect( wsproto + window.location.host + '/ws', @@ -44,10 +41,6 @@ export class WebSocketService { } public send(key: string, data?: any, trigger?: any): void { - // If the WebSocket is not connected then the QueueingSubject will ensure - // that messages are queued and delivered when the WebSocket reconnects. - // A regular Subject can be used to discard messages sent when the WebSocket - // is disconnected. // TODO: do this nicer? const message = {'key': key}; if (data) {