diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-05-26 11:22:50 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-05-26 11:22:50 +0200 |
commit | dff361dc5ce4501396974785b2be22287b15b895 (patch) | |
tree | e21e0c71cd3ac56cdfd95cb2bbbb67ba23985620 /lib/private/httphelper.php | |
parent | b82d902e184960877110bc45124ed2399f779cac (diff) | |
download | nextcloud-server-dff361dc5ce4501396974785b2be22287b15b895.tar.gz nextcloud-server-dff361dc5ce4501396974785b2be22287b15b895.zip |
Add connection timeout to default POST options
Fixes https://github.com/owncloud/core/issues/16560
Diffstat (limited to 'lib/private/httphelper.php')
-rw-r--r-- | lib/private/httphelper.php | 8 |
1 files changed, 7 insertions, 1 deletions
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()]; } |