campaignmonitor/createsend-php — pull request #14 by nbertram (2012-10-18 22:49:55+00:00)
Title: Add default timeout to curl calls

I've added a simple define CS_REST_CALL_TIMEOUT next to CS_REST_SOCKET_TIMEOUT. The curl transport wasn't respecting the SOCKET_TIMEOUT (have now mapped it on to CURLOPT_CONNECTTIMEOUT) and it was possible when using the curl transport through a flakey proxy for it to hang pretty much forever on API calls. The PHP Curl library enforces no real default timeout once connected.

The transfer timeout defaults to 10 seconds.

I know I could've accomplished this by injecting a custom transport, but I thought the greater good would be to push this upstream.