socket-function 0.40.0 → 0.41.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "0.40.0",
3
+ "version": "0.41.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",
@@ -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() - startTime);
211
+ harvestableCallTimes.push({ start: startTime, end: Date.now(), });
212
212
 
213
213
  if (result.error) {
214
214
  reject(convertErrorStackToError(result.error));