mirror of
https://github.com/peter-evans/dockerhub-description.git
synced 2024-11-25 13:39:33 +01:00
build: update distribution (#183)
Co-authored-by: actions-bot <actions-bot@users.noreply.github.com>
This commit is contained in:
parent
de56f90828
commit
2c2024be8b
1 changed files with 4 additions and 1 deletions
5
dist/index.js
vendored
5
dist/index.js
vendored
|
@ -3977,8 +3977,11 @@ function fixResponseChunkedTransferBadEnding(request, errorCallback) {
|
|||
|
||||
if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {
|
||||
response.once('close', function (hadError) {
|
||||
// tests for socket presence, as in some situations the
|
||||
// the 'socket' event is not triggered for the request
|
||||
// (happens in deno), avoids `TypeError`
|
||||
// if a data listener is still present we didn't end cleanly
|
||||
const hasDataListener = socket.listenerCount('data') > 0;
|
||||
const hasDataListener = socket && socket.listenerCount('data') > 0;
|
||||
|
||||
if (hasDataListener && !hadError) {
|
||||
const err = new Error('Premature close');
|
||||
|
|
Loading…
Reference in a new issue