socket-function 0.40.0 → 0.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/src/CallFactory.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "socket-function",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"mobx": "^6.6.2",
|
|
12
12
|
"node-forge": "https://github.com/sliftist/forge#name",
|
|
13
13
|
"pako": "^2.1.0",
|
|
14
|
-
"preact": "
|
|
14
|
+
"preact": "10.24.3",
|
|
15
15
|
"typenode": "^5.6.0",
|
|
16
16
|
"ws": "^8.17.1"
|
|
17
17
|
},
|
package/src/CallFactory.ts
CHANGED
|
@@ -71,7 +71,7 @@ export interface SenderInterface {
|
|
|
71
71
|
let pendingCallCount = 0;
|
|
72
72
|
let harvestableFailedCalls = 0;
|
|
73
73
|
const CALL_TIMES_LIMIT = 1000 * 1000 * 10;
|
|
74
|
-
let harvestableCallTimes: number[] = [];
|
|
74
|
+
let harvestableCallTimes: { start: number; end: number; }[] = [];
|
|
75
75
|
export function harvestFailedCallCount() {
|
|
76
76
|
let count = harvestableFailedCalls;
|
|
77
77
|
harvestableFailedCalls = 0;
|
|
@@ -208,7 +208,7 @@ export async function createCallFactory(
|
|
|
208
208
|
let callback = (result: InternalReturnType) => {
|
|
209
209
|
pendingCallCount--;
|
|
210
210
|
pendingCalls.delete(seqNum);
|
|
211
|
-
harvestableCallTimes.push(Date.now()
|
|
211
|
+
harvestableCallTimes.push({ start: startTime, end: Date.now(), });
|
|
212
212
|
|
|
213
213
|
if (result.error) {
|
|
214
214
|
reject(convertErrorStackToError(result.error));
|