(client, request)
| 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; |
no test coverage detected