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

Function writeH1

github-actions/browserstack/set-browserstack-env.js:6635–6756  ·  view source on GitHub ↗
(client, request)

Source from the content-addressed store, hash-verified

6633 }
6634 if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) {
6635 return true;
6636 }
6637 }
6638 return false;
6639 }
6640 };
6641 });
6642 }
6643 function clearIdleSocketValidation(socket) {
6644 if (socket[kIdleSocketValidationTimeout]) {
6645 clearImmediate(socket[kIdleSocketValidationTimeout]);
6646 socket[kIdleSocketValidationTimeout] = null;
6647 }
6648 socket[kIdleSocketValidation] = 0;
6649 }
6650 function scheduleIdleSocketValidation(client, socket) {
6651 socket[kIdleSocketValidation] = 1;
6652 socket[kIdleSocketValidationTimeout] = setImmediate(() => {
6653 socket[kIdleSocketValidationTimeout] = null;
6654 socket[kIdleSocketValidation] = 2;
6655 if (client[kSocket] === socket && !socket.destroyed) {
6656 client[kResume]();
6657 }
6658 });
6659 }
6660 function resumeH1(client) {
6661 const socket = client[kSocket];
6662 if (socket && !socket.destroyed) {
6663 if (client[kSize] === 0) {
6664 if (!socket[kNoRef] && socket.unref) {
6665 socket.unref();
6666 socket[kNoRef] = true;
6667 }
6668 } else if (socket[kNoRef] && socket.ref) {
6669 socket.ref();
6670 socket[kNoRef] = false;
6671 }
6672 if (client[kRunning] === 0 && client[kPending] > 0 && socket[kSocketUsed]) {
6673 if (socket[kIdleSocketValidation] === 0) {
6674 scheduleIdleSocketValidation(client, socket);
6675 socket[kParser].readMore();
6676 if (socket.destroyed) {
6677 return;
6678 }
6679 return;
6680 }
6681 if (socket[kIdleSocketValidation] === 1) {
6682 socket[kParser].readMore();
6683 if (socket.destroyed) {
6684 return;
6685 }
6686 return;
6687 }
6688 }
6689 if (client[kRunning] === 0) {
6690 socket[kParser].readMore();
6691 if (socket.destroyed) {
6692 return;

Callers 1

writeFunction · 0.70

Calls 10

extractBodyFunction · 0.70
shouldSendContentLengthFunction · 0.70
writeBufferFunction · 0.70
writeIterableFunction · 0.70
writeBlobFunction · 0.70
writeStreamFunction · 0.70
pushMethod · 0.45
onConnectMethod · 0.45
streamMethod · 0.45

Tested by

no test coverage detected