Fix issue with websocket buffer.

This commit is contained in:
Dessalines 2021-12-02 09:59:31 -05:00
parent f0f97f2eb6
commit a4f023d250

View file

@ -3,6 +3,7 @@ import { Observable } from "rxjs";
import { share } from "rxjs/operators"; import { share } from "rxjs/operators";
import { import {
ExponentialBackoff, ExponentialBackoff,
LRUBuffer,
Websocket as WS, Websocket as WS,
WebsocketBuilder, WebsocketBuilder,
} from "websocket-ts"; } from "websocket-ts";
@ -47,6 +48,7 @@ export class WebSocketService {
console.error("Websocket closed."); console.error("Websocket closed.");
}) })
.withBackoff(new ExponentialBackoff(100, 7)) .withBackoff(new ExponentialBackoff(100, 7))
.withBuffer(new LRUBuffer(1000))
.build(); .build();
}).pipe(share()); }).pipe(share());