diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-06-26 12:55:05 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-06-26 12:55:05 +0200 |
commit | 7a9d60d87eb8e4414e5fe05830b088d426ff810d (patch) | |
tree | 0fc97a7eacfd071475afd8bc6d4372babacb5740 /apps/federatedfilesharing/lib | |
parent | 5387b942c44e05b87ba2a0fd54168f5278a31344 (diff) | |
parent | 52eab2a61a5d27b64fcd0440b91f854c052933a9 (diff) | |
download | nextcloud-server-7a9d60d87eb8e4414e5fe05830b088d426ff810d.tar.gz nextcloud-server-7a9d60d87eb8e4414e5fe05830b088d426ff810d.zip |
Merge remote-tracking branch 'upstream/master' into master-upstream-sync
Diffstat (limited to 'apps/federatedfilesharing/lib')
-rw-r--r-- | apps/federatedfilesharing/lib/DiscoveryManager.php | 5 | ||||
-rw-r--r-- | apps/federatedfilesharing/lib/Notifications.php | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/apps/federatedfilesharing/lib/DiscoveryManager.php b/apps/federatedfilesharing/lib/DiscoveryManager.php index 279f86eda30..d65dad3085e 100644 --- a/apps/federatedfilesharing/lib/DiscoveryManager.php +++ b/apps/federatedfilesharing/lib/DiscoveryManager.php @@ -84,7 +84,10 @@ class DiscoveryManager { // Read the data from the response body try { - $response = $this->client->get($remote . '/ocs-provider/'); + $response = $this->client->get($remote . '/ocs-provider/', [ + 'timeout' => 10, + 'connect_timeout' => 10, + ]); if($response->getStatusCode() === 200) { $decodedService = json_decode($response->getBody(), true); if(is_array($decodedService)) { diff --git a/apps/federatedfilesharing/lib/Notifications.php b/apps/federatedfilesharing/lib/Notifications.php index b2e665ed5fd..ac55642b858 100644 --- a/apps/federatedfilesharing/lib/Notifications.php +++ b/apps/federatedfilesharing/lib/Notifications.php @@ -287,7 +287,9 @@ class Notifications { $endpoint = $this->discoveryManager->getShareEndpoint($protocol . $remoteDomain); try { $response = $client->post($protocol . $remoteDomain . $endpoint . $urlSuffix . '?format=' . self::RESPONSE_FORMAT, [ - 'body' => $fields + 'body' => $fields, + 'timeout' => 10, + 'connect_timeout' => 10, ]); $result['result'] = $response->getBody(); $result['success'] = true; |