MCPcopy Create free account
hub / github.com/angular/dev-infra / onParserTimeout

Function onParserTimeout

github-actions/saucelabs/set-saucelabs-env.js:6429–6444  ·  view source on GitHub ↗
(parser)

Source from the content-addressed store, hash-verified

6427 } else if (socket[kReset] && client[kRunning] === 0) {
6428 util.destroy(socket, new InformationalError("reset"));
6429 return constants3.ERROR.PAUSED;
6430 } else if (client[kPipelining] == null || client[kPipelining] === 1) {
6431 setImmediate(() => client[kResume]());
6432 } else {
6433 client[kResume]();
6434 }
6435 }
6436 };
6437 function onParserTimeout(parser) {
6438 const { socket, timeoutType, client, paused } = parser.deref();
6439 if (timeoutType === TIMEOUT_HEADERS) {
6440 if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
6441 assert(!paused, "cannot be paused while waiting for headers");
6442 util.destroy(socket, new HeadersTimeoutError());
6443 }
6444 } else if (timeoutType === TIMEOUT_BODY) {
6445 if (!paused) {
6446 util.destroy(socket, new BodyTimeoutError());
6447 }

Callers

nothing calls this directly

Calls 2

derefMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected