Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Jul 22, 2021
1 parent b43b2da commit e6100d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/api/api-request.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const { Blob } = require('buffer')
const util = require('../core/util')
const { AsyncResource } = require('async_hooks')
const { addSignal, removeSignal } = require('./abort-signal')
const EE = require('events')

const kAbort = Symbol('abort')
const kResume = Symbol('resume')
Expand All @@ -24,8 +25,7 @@ class RequestBody extends Readable {
this[kReadableDidRead] = false

if (typeof this.readableDidRead !== 'boolean') {
this.pause()
this.once('data', function () {
EE.prototype.on.call(this, 'data', function () {
this[kReadableDidRead] = true
})
}
Expand Down

0 comments on commit e6100d2

Please sign in to comment.