]> Untitled Git - lemmy-ui.git/commitdiff
Fix issue with websocket buffer.
authorDessalines <tyhou13@gmx.com>
Thu, 2 Dec 2021 14:59:31 +0000 (09:59 -0500)
committerDessalines <tyhou13@gmx.com>
Thu, 2 Dec 2021 14:59:31 +0000 (09:59 -0500)
src/shared/services/WebSocketService.ts

index 85a1af85b83aa4413d100938b71fb614d8aed726..ea5d3f6e19e754b299efd19622a6f33fbd3948e6 100644 (file)
@@ -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());