Skip to content

Commit

Permalink
fix: node 12.9 (#449)
Browse files Browse the repository at this point in the history
Fixes: #448
  • Loading branch information
ronag committed Oct 9, 2020
1 parent 9e73b20 commit 05b782c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/core/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,14 @@ class Client extends EventEmitter {
class Parser extends HTTPParser {
constructor (client, socket) {
/* istanbul ignore next */
if (nodeMajorVersion >= 12) {
if (nodeMajorVersion === 12) {
super()
this.initialize(
HTTPParser.RESPONSE,
{},
client[kHeadersTimeout]
)
} else if (nodeMajorVersion > 12) {
super()
this.initialize(
HTTPParser.RESPONSE,
Expand Down

0 comments on commit 05b782c

Please sign in to comment.