MCPcopy
hub / github.com/mongodb/node-mongodb-native / timeoutForSocketRead

Method timeoutForSocketRead

src/timeout.ts:287–292  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

285 }
286
287 get timeoutForSocketRead(): Timeout | null {
288 const { remainingTimeMS } = this;
289 if (!Number.isFinite(remainingTimeMS)) return null;
290 if (remainingTimeMS > 0) return Timeout.expires(remainingTimeMS);
291 return Timeout.reject(new MongoOperationTimeoutError('Timed out before socket read'));
292 }
293
294 refresh(): void {
295 this.start = Math.trunc(performance.now());

Callers

nothing calls this directly

Calls 2

expiresMethod · 0.80
rejectMethod · 0.80

Tested by

no test coverage detected