(delay, type)
| 6055 | this.maxResponseSize = client[kMaxResponseSize]; |
| 6056 | } |
| 6057 | setTimeout(delay, type) { |
| 6058 | if (delay !== this.timeoutValue || type & USE_FAST_TIMER ^ this.timeoutType & USE_FAST_TIMER) { |
| 6059 | if (this.timeout) { |
| 6060 | timers.clearTimeout(this.timeout); |
| 6061 | this.timeout = null; |
| 6062 | } |
| 6063 | if (delay) { |
| 6064 | if (type & USE_FAST_TIMER) { |
| 6065 | this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); |
| 6066 | } else { |
| 6067 | this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); |
| 6068 | this.timeout.unref(); |
| 6069 | } |
| 6070 | } |
| 6071 | this.timeoutValue = delay; |
| 6072 | } else if (this.timeout) { |
| 6073 | if (this.timeout.refresh) { |
| 6074 | this.timeout.refresh(); |
| 6075 | } |
| 6076 | } |
| 6077 | this.timeoutType = type; |
| 6078 | } |
| 6079 | resume() { |
| 6080 | if (this.socket.destroyed || !this.paused) { |
| 6081 | return; |
no test coverage detected