diff --git a/src/PhpseclibV3/StubSftpConnectionProvider.php b/src/PhpseclibV3/StubSftpConnectionProvider.php index 2dc5258ef..0e673a7ee 100644 --- a/src/PhpseclibV3/StubSftpConnectionProvider.php +++ b/src/PhpseclibV3/StubSftpConnectionProvider.php @@ -25,6 +25,7 @@ public function disconnect(): void { if ($this->connection) { $this->connection->disconnect(); + $this->connection = null; } }