serum-vial
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -109,3 +109,3 @@ "use strict"; | ||
idleTimeout: 60, | ||
maxBackpressure: 512 * 1024, | ||
maxBackpressure: 1024 * 1024, | ||
closeOnBackpressureLimit: true, | ||
@@ -256,5 +256,5 @@ message: (ws, message) => { | ||
while (ws.getBufferedAmount() > 0) { | ||
await helpers_1.wait(2); | ||
await helpers_1.wait(3); | ||
retries += 1; | ||
if (retries > 300) { | ||
if (retries > 600) { | ||
ws.end(1008, 'Too much backpressure'); | ||
@@ -265,3 +265,3 @@ } | ||
if (message !== undefined) { | ||
ws.send(message); | ||
ws.send(message, false); | ||
} | ||
@@ -268,0 +268,0 @@ } |
{ | ||
"name": "serum-vial", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=15" |
@@ -94,3 +94,3 @@ import { getLayoutVersion, Market } from '@project-serum/serum' | ||
idleTimeout: 60, // closes WS connection if no message/ping send/received in 1 minute | ||
maxBackpressure: 512 * 1024, // close if client is too slow to read the data fast enough | ||
maxBackpressure: 1024 * 1024, // close if client is too slow to read the data fast enough | ||
closeOnBackpressureLimit: true, | ||
@@ -319,6 +319,6 @@ message: (ws: any, message: any) => { | ||
while (ws.getBufferedAmount() > 0) { | ||
await wait(2) | ||
await wait(3) | ||
retries += 1 | ||
if (retries > 300) { | ||
if (retries > 600) { | ||
ws.end(1008, 'Too much backpressure') | ||
@@ -330,3 +330,3 @@ } | ||
if (message !== undefined) { | ||
ws.send(message) | ||
ws.send(message, false) | ||
} | ||
@@ -333,0 +333,0 @@ } |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
273933