Skip to content

Commit

Permalink
fix: skip readMore call if parser is null or undefined (nodejs#2346)
Browse files Browse the repository at this point in the history
  • Loading branch information
iiAku authored and crysmags committed Feb 27, 2024
1 parent d4abe03 commit 1664199
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,9 @@ function onParserTimeout (parser) {

function onSocketReadable () {
const { [kParser]: parser } = this
parser.readMore()
if (parser) {
parser.readMore()
}
}

function onSocketError (err) {
Expand Down

0 comments on commit 1664199

Please sign in to comment.