diff --git a/fulcrm_apiv2.module b/fulcrm_apiv2.module index b180f03..6f3ad2e 100644 --- a/fulcrm_apiv2.module +++ b/fulcrm_apiv2.module @@ -133,6 +133,12 @@ function fulcrm_apiv2_http( $method, $object = null, $data = null, $query = null curl_setopt( $curl, CURLOPT_HTTPHEADER, $request_headers ); curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, true ); curl_setopt( $curl, CURLOPT_TCP_NODELAY, true ); + try { + curl_setopt( $curl, CURLOPT_CONNECTTIMEOUT, 2 ); + curl_setopt( $curl, CURLOPT_TIMEOUT, 10 ); + } catch ( Exception $e ) { + // do nothing + } $result = curl_exec( $curl ); $response = curl_getinfo( $curl );