From 3f9aec3547e13e4767e72a91600fc0a2b3fe7095 Mon Sep 17 00:00:00 2001 From: Vincent Casse Date: Tue, 15 Dec 2015 17:25:42 +0100 Subject: [PATCH] Add default timeout on http client Issue #18 --- src/Api.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Api.php b/src/Api.php index ba28784..6b8d067 100644 --- a/src/Api.php +++ b/src/Api.php @@ -128,6 +128,8 @@ class Api if (!isset($http_client)) { $http_client = new GClient(); + $http_client->setDefaultOption('timeout', 30); + $http_client->setDefaultOption('connect_timeout', 5); } $this->application_key = $application_key;