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

Connections don't get limited #292

Open
SrIzan10 opened this issue Nov 19, 2023 · 3 comments
Open

Connections don't get limited #292

SrIzan10 opened this issue Nov 19, 2023 · 3 comments

Comments

@SrIzan10
Copy link

Connections don't get limited when installing.

const agent = new Agent({ connections: 1 })
const instTask = installTask(installer, minecraftLocation, { agent: resolveAgent({ dispatcher: agent }) })

Errors:

[1]   [errors]: [
[1]     ConnectTimeoutError: Connect Timeout Error
[1]         at onConnectTimeout (C:\Users\USER\Desktop\Development\pmc-launcher\node_modules\undici\lib\core\connect.js:186:24)   
[1]         at C:\Users\USER\Desktop\Development\pmc-launcher\node_modules\undici\lib\core\connect.js:133:46
[1]         at Immediate._onImmediate (C:\Users\USER\Desktop\Development\pmc-launcher\node_modules\undici\lib\core\connect.js:172:33)
[1]         at process.processImmediate (node:internal/timers:476:21) {
[1]       code: 'UND_ERR_CONNECT_TIMEOUT',
[1]       url: 'https://piston-meta.mojang.com/v1/packages/12888726d2cc035d30965bcf8c825c7ac5f28ea0/1.20.2.json'
[1]     }
[1]   ]
[1] }
...
@Nogitsu
Copy link

Nogitsu commented Nov 19, 2023

On my side I'm doing the same for installAssetsTask, I just don't have the resolveAgent, try removing it maybe.

@SrIzan10
Copy link
Author

oh, okay!
then it looks like the types are wrong:
Type '{ dispatcher: Agent; }' is missing the following properties from type 'DownloadAgent': retryHandler, rangePolicy, checkpointHandler, head, dispatchts(2739)

@SrIzan10
Copy link
Author

I believe the issue is still there, after a few installation attempts it just times out. Is it related to this issue?

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