summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-05-31 15:24:29 +0200
committerRobin Appelman <robin@icewind.nl>2021-10-07 17:19:36 +0200
commit6b80ae9d4423369a95dbdd5a02ffafe8b295f746 (patch)
tree5b5f6924b5c7984cf7d6b6d1374042b62ddbe2de /apps/files_external
parent7ec80b39579f6764778c74a6989972a955ba6757 (diff)
downloadnextcloud-server-6b80ae9d4423369a95dbdd5a02ffafe8b295f746.tar.gz
nextcloud-server-6b80ae9d4423369a95dbdd5a02ffafe8b295f746.zip
teardown
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/Lib/Storage/FTP.php6
-rw-r--r--apps/files_external/tests/Storage/FtpTest.php1
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/Storage/FTP.php b/apps/files_external/lib/Lib/Storage/FTP.php
index 8f7155727be..3edf22d03fc 100644
--- a/apps/files_external/lib/Lib/Storage/FTP.php
+++ b/apps/files_external/lib/Lib/Storage/FTP.php
@@ -40,7 +40,7 @@ class FTP extends Common {
private $port;
private $utf8Mode;
- /** @var FtpConnection */
+ /** @var FtpConnection|null */
private $connection;
public function __construct($params) {
@@ -65,6 +65,10 @@ class FTP extends Common {
}
}
+ public function __destruct() {
+ $this->connection = null;
+ }
+
protected function getConnection(): FtpConnection {
if (!$this->connection) {
try {
diff --git a/apps/files_external/tests/Storage/FtpTest.php b/apps/files_external/tests/Storage/FtpTest.php
index 3a8f94fb7fe..461e1ffb5c3 100644
--- a/apps/files_external/tests/Storage/FtpTest.php
+++ b/apps/files_external/tests/Storage/FtpTest.php
@@ -59,6 +59,7 @@ class FtpTest extends \Test\Files\Storage\Storage {
if ($this->instance) {
$this->instance->rmdir('');
}
+ $this->instance = null;
parent::tearDown();
}