Skip to content

Commit

Permalink
fix: only paused if ret === false
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Nov 12, 2020
1 parent 98825f9 commit fb7fe1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Request {
resume()
})

if (!ret) {
if (ret === false) {
this[kPaused] = true
}

Expand All @@ -169,7 +169,7 @@ class Request {

const ret = this[kHandler].onData(chunk.slice(offset, offset + length))

if (!ret) {
if (ret === false) {
this[kPaused] = true
}

Expand Down

0 comments on commit fb7fe1d

Please sign in to comment.