From: Dessalines Date: Thu, 2 Dec 2021 14:59:31 +0000 (-0500) Subject: Fix issue with websocket buffer. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%7BpictshareAvatarThumbnail%28admin.avatar%29%7D?a=commitdiff_plain;h=a4f023d2502dcaefc79850d3f7d94655202e11c1;p=lemmy-ui.git Fix issue with websocket buffer. --- diff --git a/src/shared/services/WebSocketService.ts b/src/shared/services/WebSocketService.ts index 85a1af8..ea5d3f6 100644 --- a/src/shared/services/WebSocketService.ts +++ b/src/shared/services/WebSocketService.ts @@ -3,6 +3,7 @@ import { Observable } from "rxjs"; import { share } from "rxjs/operators"; import { ExponentialBackoff, + LRUBuffer, Websocket as WS, WebsocketBuilder, } from "websocket-ts"; @@ -47,6 +48,7 @@ export class WebSocketService { console.error("Websocket closed."); }) .withBackoff(new ExponentialBackoff(100, 7)) + .withBuffer(new LRUBuffer(1000)) .build(); }).pipe(share());