Skip to content

Commit

Permalink
Close FTP connection
Browse files Browse the repository at this point in the history
  • Loading branch information
arxeiss committed Aug 2, 2024
1 parent 9e4994d commit 46255fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Deployment/FtpServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ public function __construct(
$this->passiveMode = $passiveMode;
}

function __destruct()
{
if ($this->connection) { // reconnect?
@ftp_close($this->connection); // @ may fail
}
}


/**
* Connects to FTP server.
Expand Down

0 comments on commit 46255fb

Please sign in to comment.