(buf)
| 6216 | } else { |
| 6217 | throw this.createError(ret, body); |
| 6218 | } |
| 6219 | } |
| 6220 | } catch (err) { |
| 6221 | util.destroy(socket, err); |
| 6222 | } |
| 6223 | } |
| 6224 | finish() { |
| 6225 | assert(currentParser === null); |
| 6226 | assert(this.ptr != null); |
| 6227 | assert(!this.paused); |
| 6228 | const { llhttp } = this; |
| 6229 | let ret; |
| 6230 | try { |
| 6231 | currentParser = this; |
| 6232 | ret = llhttp.llhttp_finish(this.ptr); |
| 6233 | } finally { |
| 6234 | currentParser = null; |
| 6235 | } |
| 6236 | if (ret === constants3.ERROR.OK) { |
| 6237 | return null; |
| 6238 | } |
| 6239 | if (ret === constants3.ERROR.PAUSED || ret === constants3.ERROR.PAUSED_UPGRADE) { |
| 6240 | this.paused = true; |
| 6241 | return null; |
no test coverage detected