Explorar el Código

Merge pull request #59 from jakebathman/master

Add support for fractional timeout seconds
Jan Oris hace 8 años
padre
commit
6f96e1ccd6
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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) );
     }
 
     /**