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

How to make "timeout" take effect #124

Open
xiaonuo915 opened this issue Aug 26, 2019 · 1 comment
Open

How to make "timeout" take effect #124

xiaonuo915 opened this issue Aug 26, 2019 · 1 comment

Comments

@xiaonuo915
Copy link

I use "sync-request" at node.js.
I need to use a sync request for some reason.
Requests may be interrupted due to network fluctuations. I tried to add a timeout to the sync-request configuration item, but it didn't take effect.
this is code:

		let res = syncRequest('GET', url, {
			timeout: 5000,
			socketTimeout: 5000,
			maxRetries: 1,
			retryDelay: 10
		});
		let result = res.getBody("utf8");

Is this what is the reason?

@quanru
Copy link

quanru commented Mar 18, 2020

+1

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