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

CURLOPT_TIMEOUT & CURLOPT_CONNECTTIMEOUT should not be same #83

Closed
masihyeganeh opened this issue Nov 11, 2013 · 4 comments
Closed

CURLOPT_TIMEOUT & CURLOPT_CONNECTTIMEOUT should not be same #83

masihyeganeh opened this issue Nov 11, 2013 · 4 comments

Comments

@masihyeganeh
Copy link

there's this code in source:

curl_setopt($this->fp, CURLOPT_TIMEOUT, $options['timeout']);
curl_setopt($this->fp, CURLOPT_CONNECTTIMEOUT, $options['timeout']);

it shows that a single option is used for two curl_opt.
It's OK for normal connections but for downloading large files, CURLOPT_CONNECTTIMEOUT should be way more than CURLOPT_TIMEOUT

@rmccue
Copy link
Collaborator

rmccue commented Nov 11, 2013

Related: #58

I'd like to introduce a separate 'connect_timeout' value that defaults to the same value as 'timeout'. For most uses, having these the same is fine.

(Also, I think you mean the other way around? The connection timeout should always be the same, but the regular timeout should be larger for large files.)

@masihyeganeh
Copy link
Author

Yeah, exactly inverse of what i said 😆 (my mistake)
but yeah, i think a separate connect_timeout value that defaults to the same value as timeout is the best solution

@ozh
Copy link
Collaborator

ozh commented Feb 5, 2014

This issue can be closed

@masihyeganeh
Copy link
Author

Thanks for merge

@rmccue rmccue added this to the 1.7 milestone Feb 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants