(client)
| 6582 | socket[kIdleSocketValidationTimeout] = setImmediate(() => { |
| 6583 | socket[kIdleSocketValidationTimeout] = null; |
| 6584 | socket[kIdleSocketValidation] = 2; |
| 6585 | if (client[kSocket] === socket && !socket.destroyed) { |
| 6586 | client[kResume](); |
| 6587 | } |
| 6588 | }); |
| 6589 | } |
| 6590 | function resumeH1(client) { |
| 6591 | const socket = client[kSocket]; |
| 6592 | if (socket && !socket.destroyed) { |
| 6593 | if (client[kSize] === 0) { |
| 6594 | if (!socket[kNoRef] && socket.unref) { |
| 6595 | socket.unref(); |
| 6596 | socket[kNoRef] = true; |
| 6597 | } |
| 6598 | } else if (socket[kNoRef] && socket.ref) { |
| 6599 | socket.ref(); |
| 6600 | socket[kNoRef] = false; |
| 6601 | } |
| 6602 | if (client[kRunning] === 0 && client[kPending] > 0 && socket[kSocketUsed]) { |
| 6603 | if (socket[kIdleSocketValidation] === 0) { |
| 6604 | scheduleIdleSocketValidation(client, socket); |
| 6605 | socket[kParser].readMore(); |
| 6606 | if (socket.destroyed) { |
| 6607 | return; |
| 6608 | } |
| 6609 | return; |
| 6610 | } |
| 6611 | if (socket[kIdleSocketValidation] === 1) { |
| 6612 | socket[kParser].readMore(); |
| 6613 | if (socket.destroyed) { |
| 6614 | return; |
| 6615 | } |
| 6616 | return; |
| 6617 | } |
| 6618 | } |
| 6619 | if (client[kRunning] === 0) { |
| 6620 | socket[kParser].readMore(); |
| 6621 | if (socket.destroyed) { |
| 6622 | return; |
| 6623 | } |
| 6624 | } |
| 6625 | if (client[kSize] === 0) { |
| 6626 | if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { |
| 6627 | socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); |
| 6628 | } |
| 6629 | } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { |
| 6630 | if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { |
| 6631 | const request = client[kQueue][client[kRunningIdx]]; |
| 6632 | const headersTimeout = request.headersTimeout != null ? request.headersTimeout : client[kHeadersTimeout]; |
| 6633 | socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS); |
| 6634 | } |
no test coverage detected