summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Berendt <berendt@b1-systems.de>2013-07-08 16:06:08 +0200
committerChristian Berendt <berendt@b1-systems.de>2013-07-08 16:06:08 +0200
commit020803aa7e75268d3dbc7413c35ef07b50d5055e (patch)
treec2028ac9db34a75fe6f9e0fc2871d8e8157ca440
parentdeda583fadab7e823ba9acf61e6596188eba48c5 (diff)
downloadnextcloud-server-020803aa7e75268d3dbc7413c35ef07b50d5055e.tar.gz
nextcloud-server-020803aa7e75268d3dbc7413c35ef07b50d5055e.zip
minimize waiting time
-rw-r--r--apps/files_external/lib/amazons3.php4
-rw-r--r--apps/files_external/tests/amazons3.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index 756a03b6b54..b55f913e278 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -83,7 +83,9 @@ class AmazonS3 extends \OC\Files\Storage\Common {
$result = $this->connection->createBucket(array(
'Bucket' => $this->bucket
));
- sleep(5);
+ while ( ! $this->connection->doesBucketExist($this->bucket)) {
+ sleep(1);
+ }
}
if ( ! $this->file_exists('.')) {
diff --git a/apps/files_external/tests/amazons3.php b/apps/files_external/tests/amazons3.php
index 15bf9b14772..bd9348bf818 100644
--- a/apps/files_external/tests/amazons3.php
+++ b/apps/files_external/tests/amazons3.php
@@ -59,7 +59,9 @@ class AmazonS3 extends Storage {
'Bucket' => $this->config['amazons3']['bucket']
));
- sleep(5);
+ while($connection->doesBucketExist($this->config['amazons3']['bucket'])) {
+ sleep(1);
+ }
}
}
}