Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECONNRESET error #38

Open
richardlau opened this issue Oct 16, 2024 · 1 comment
Open

ECONNRESET error #38

richardlau opened this issue Oct 16, 2024 · 1 comment

Comments

@richardlau
Copy link
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.

@rvagg
Copy link
Member

rvagg commented Oct 16, 2024

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants