()
| 6144 | this.paused = true; |
| 6145 | socket.unshift(body); |
| 6146 | } else { |
| 6147 | throw this.createError(ret, body); |
| 6148 | } |
| 6149 | } |
| 6150 | } catch (err) { |
| 6151 | util.destroy(socket, err); |
| 6152 | } |
| 6153 | } |
| 6154 | finish() { |
| 6155 | assert(currentParser === null); |
| 6156 | assert(this.ptr != null); |
| 6157 | assert(!this.paused); |
| 6158 | const { llhttp } = this; |
| 6159 | let ret; |
| 6160 | try { |
| 6161 | currentParser = this; |
| 6162 | ret = llhttp.llhttp_finish(this.ptr); |
| 6163 | } finally { |
| 6164 | currentParser = null; |
| 6165 | } |
| 6166 | if (ret === constants3.ERROR.OK) { |
| 6167 | return null; |
| 6168 | } |
| 6169 | if (ret === constants3.ERROR.PAUSED || ret === constants3.ERROR.PAUSED_UPGRADE) { |
no test coverage detected