From 94fd4315055d962eac225844c82cc894dd07a082 Mon Sep 17 00:00:00 2001 From: Frank de Jonge Date: Thu, 27 Jan 2022 08:11:28 +0100 Subject: [PATCH] Immediately return connection after creating it. --- src/Ftp/FtpAdapter.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Ftp/FtpAdapter.php b/src/Ftp/FtpAdapter.php index fd5d169a1..797ab0c93 100644 --- a/src/Ftp/FtpAdapter.php +++ b/src/Ftp/FtpAdapter.php @@ -120,6 +120,8 @@ private function connection() if ( ! $this->hasFtpConnection()) { $this->connection = $this->connectionProvider->createConnection($this->connectionOptions); $this->rootDirectory = $this->resolveConnectionRoot($this->connection); + + return $this->connection; } if ($this->connectivityChecker->isConnected($this->connection) === false) {