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 authored Oct 7, 2020
1 parent 90ac7b6 commit 6c2da70
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 6c2da70

Please sign in to comment.