serum-vial
Advanced tools
Comparing version 1.0.13 to 1.0.14
@@ -59,6 +59,6 @@ "use strict"; | ||
this._listMarkets = async (res) => { | ||
res.onAborted(() => { | ||
res.aborted = true; | ||
}); | ||
if (this._cachedListMarketsResponse === undefined) { | ||
res.onAborted(() => { | ||
res.aborted = true; | ||
}); | ||
const markets = await Promise.all(this._markets.map((market) => { | ||
@@ -83,3 +83,3 @@ return helpers_1.executeAndRetry(async () => { | ||
return serumMarket; | ||
}, { maxRetries: 4 }); | ||
}, { maxRetries: 10 }); | ||
})); | ||
@@ -91,3 +91,3 @@ this._cachedListMarketsResponse = JSON.stringify(markets, null, 2); | ||
res.writeHeader('content-type', 'application/json'); | ||
res.end(this._cachedListMarketsResponse); | ||
res.end(this._cachedListMarketsResponse, true); | ||
} | ||
@@ -94,0 +94,0 @@ }; |
{ | ||
"name": "serum-vial", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"engines": { | ||
@@ -5,0 +5,0 @@ "node": ">=15" |
@@ -131,7 +131,7 @@ import { getLayoutVersion, Market } from '@project-serum/serum' | ||
private _listMarkets = async (res: HttpResponse) => { | ||
res.onAborted(() => { | ||
res.aborted = true | ||
}) | ||
if (this._cachedListMarketsResponse === undefined) { | ||
res.onAborted(() => { | ||
res.aborted = true | ||
}) | ||
if (this._cachedListMarketsResponse === undefined) { | ||
const markets = await Promise.all( | ||
@@ -165,3 +165,3 @@ this._markets.map((market) => { | ||
}, | ||
{ maxRetries: 4 } | ||
{ maxRetries: 10 } | ||
) | ||
@@ -177,3 +177,3 @@ }) | ||
res.writeHeader('content-type', 'application/json') | ||
res.end(this._cachedListMarketsResponse) | ||
;(res.end as any)(this._cachedListMarketsResponse, true) | ||
} | ||
@@ -180,0 +180,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
275082