Skip to content

Commit

Permalink
chore: tweak backpressure handling
Browse files Browse the repository at this point in the history
  • Loading branch information
thaaddeus committed Dec 16, 2021
1 parent 2f81942 commit 96523af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/minion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ class Minion {

private async _send(ws: WebSocket, getMessage: () => string | undefined) {
let retries = 0
while (ws.getBufferedAmount() > 0) {
while (ws.getBufferedAmount() > this.MAX_BACKPRESSURE / 2) {
await wait(10)
retries += 1

Expand Down

0 comments on commit 96523af

Please sign in to comment.