Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serum-vial

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serum-vial - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

20

dist/minion.js

@@ -88,2 +88,3 @@ "use strict";

if (!res.aborted) {
res.writeStatus('200 OK');
res.writeHeader('content-type', 'application/json');

@@ -265,3 +266,3 @@ res.end(this._cachedListMarketsResponse);

let retries = 0;
while (ws.getBufferedAmount() > this.MAX_BACKPRESSURE / 2) {
while (ws.getBufferedAmount() > 0) {
await helpers_1.wait(10);

@@ -276,8 +277,13 @@ retries += 1;

if (message !== undefined) {
const status = ws.send(message, false);
if (!status) {
logger_1.logger.log('info', `Send backpressure`, {
status,
bufferedAmount: ws.getBufferedAmount()
});
const success = ws.send(message, false);
if (!success) {
retries = 0;
while (ws.getBufferedAmount() > 0) {
await helpers_1.wait(10);
retries += 1;
if (retries > 200) {
ws.end(1008, 'Too much backpressure');
return;
}
}
}

@@ -284,0 +290,0 @@ }

{
"name": "serum-vial",
"version": "1.0.8",
"version": "1.0.9",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=15"

@@ -174,2 +174,3 @@ import { getLayoutVersion, Market } from '@project-serum/serum'

if (!res.aborted) {
res.writeStatus('200 OK')
res.writeHeader('content-type', 'application/json')

@@ -328,3 +329,3 @@ res.end(this._cachedListMarketsResponse)

let retries = 0
while (ws.getBufferedAmount() > this.MAX_BACKPRESSURE / 2) {
while (ws.getBufferedAmount() > 0) {
await wait(10)

@@ -341,8 +342,14 @@ retries += 1

if (message !== undefined) {
const status = ws.send(message, false)
if (!status) {
logger.log('info', `Send backpressure`, {
status,
bufferedAmount: ws.getBufferedAmount()
})
const success = ws.send(message, false)
if (!success) {
retries = 0
while (ws.getBufferedAmount() > 0) {
await wait(10)
retries += 1
if (retries > 200) {
ws.end(1008, 'Too much backpressure')
return
}
}
}

@@ -349,0 +356,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc