Преглед изворни кода

Merge pull request #59 from jakebathman/master

Add support for fractional timeout seconds
Jan Oris пре 8 година
родитељ
комит
6f96e1ccd6
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      src/Builder.php

+ 2 - 2
src/Builder.php

@@ -50,12 +50,12 @@ class Builder {
     /**
      * Set the request timeout
      *
-     * @param   integer $timeout    The timeout for the request (in seconds. Default: 30 seconds)
+     * @param   float $timeout    The timeout for the request (in seconds, fractions of a second are okay. Default: 30 seconds)
      * @return Builder
      */
     public function withTimeout($timeout = 30)
     {
-        return $this->withCurlOption( 'TIMEOUT', $timeout );
+        return $this->withCurlOption( 'TIMEOUT_MS', ($timeout * 1000) );
     }
 
     /**