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

timeout doesn't work #340

Open
trry071 opened this issue Apr 25, 2024 · 3 comments
Open

timeout doesn't work #340

trry071 opened this issue Apr 25, 2024 · 3 comments
Assignees
Labels
triage This ticket will be looked at shortly

Comments

@trry071
Copy link

trry071 commented Apr 25, 2024

Description

微信图片_20240425165227

Sometimes the http timeout parameter does not work and will wait indefinitely.

Issue Type

No response

Operating System

No response

Node Version

None

Golang Version

Golang v1.20.6

Relevant Log Output

No response

@trry071 trry071 added the triage This ticket will be looked at shortly label Apr 25, 2024
@trry071
Copy link
Author

trry071 commented Apr 25, 2024

When you randomly enter a proxy IP, the program's timeout setting will not take effect and will wait indefinitely.

@trry071
Copy link
Author

trry071 commented Apr 25, 2024

Use the "net/http" library to set the timeout and it will work fine

@wooly99
Copy link

wooly99 commented Aug 5, 2024

Promise.race([
cycleTLS.get(imgUrl, {
...config,
headers,
}),
new Promise((_, reject) => setTimeout(() => reject(new Error()), 30000)),
])


I also noticed that the timeout seems to be ineffective in the Node.js environment. My approach is as mentioned above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage This ticket will be looked at shortly
Projects
None yet
Development

No branches or pull requests

3 participants