Skip to content

ECONNRESET error #38

Open
Open
@richardlau

Description

@richardlau
Member

I thought we had an issue for this as I'm sure we've seen this on rare occassions before, but @RafaelGSS hit this while promoting Node.js 23:

node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on DestroyableTransform instance at:
    at ClientRequest.<anonymous> (/usr/lib/node_modules/nodejs-dist-indexer/node_modules/hyperquest/index.js:14:19)
    at ClientRequest.emit (node:events:513:28)
    at TLSSocket.socketErrorListener (node:_http_client:494:9)
    at TLSSocket.emit (node:events:513:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read'
}

This prevented index.json and index.tab from being updated.

Part of the reason I thought we already had an issue for this is IIRC hyperquest is no longer maintained.

Activity

rvagg

rvagg commented on Oct 16, 2024

@rvagg
Member

function fetch (url, gitref, callback) {
const refparts = gitref.split('/')
const repo = refparts[0] === 'v8-canary'
? 'node-v8'
: (/^v0\.\d\./).test(refparts[1])
? 'node-v0.x-archive'
: 'node'
url = url.replace('{gitref}', refparts[1])
.replace('{repo}', repo) +
`?rev=${refparts[1]}`
hyperquest.get(url, githubOptions).pipe(bl((err, data) => {
if (err) {
return callback(err)
}
callback(null, data.toString())
}))
}

this could just be replaced with a native http fetch now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @rvagg@richardlau

        Issue actions

          ECONNRESET error · Issue #38 · nodejs/nodejs-dist-indexer