From dff361dc5ce4501396974785b2be22287b15b895 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Tue, 26 May 2015 11:22:50 +0200 Subject: Add connection timeout to default POST options Fixes https://github.com/owncloud/core/issues/16560 --- lib/private/httphelper.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/private/httphelper.php') diff --git a/lib/private/httphelper.php b/lib/private/httphelper.php index f7984a72ebb..9d9edb6a351 100644 --- a/lib/private/httphelper.php +++ b/lib/private/httphelper.php @@ -102,7 +102,13 @@ class HTTPHelper { $client = $this->clientService->newClient(); try { - $response = $client->post($url, ['body' => $fields]); + $response = $client->post( + $url, + [ + 'body' => $fields, + 'connect_timeout' => 10, + ] + ); } catch (\Exception $e) { return ['success' => false, 'result' => $e->getMessage()]; } -- cgit v1.2.3