Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

Use ms constants only if we have curl >= 7.16.2 #50

Merged
merged 1 commit into from
Jun 9, 2014

Conversation

Taluu
Copy link
Contributor

@Taluu Taluu commented Jun 9, 2014

This should avoid any warnings, as the constants CURLOPT_CONNECTTIMEOUT_MS and CURLOPT_TIMEOUT_MS are only available on curl >= 7.16.2

If we are below that version (should we still support it ? it is getting kinda old...), use the constants in seconds rather than milliseconds (CURL_CONNECTTIMEOUT and CURL_TIMEOUT), with a multiplication per 1000 for the handshakeTimeout parameter.

And I also took the liberty to remove the require in top of the Client class. We're using composer, so autoloading is not really our problem.

poke @guillaumepotier

@Taluu Taluu changed the title Use ms constants only if we have curl > 7.16.2 Use ms constants only if we have curl >= 7.16.2 Jun 9, 2014
guillaumepotier added a commit that referenced this pull request Jun 9, 2014
Use ms constants only if we have curl >= 7.16.2
@guillaumepotier guillaumepotier merged commit 8a82aca into master Jun 9, 2014
@guillaumepotier guillaumepotier deleted the redefine-curl-opt branch June 9, 2014 15:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants