Skip to content

Commit

Permalink
FtpServer: suppress error on closing [Closes #171]
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 8, 2024
1 parent 98e6a55 commit 891e63d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/Deployment/FtpServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ public function __construct(
}


/**
* Suppresses error on closing.
*/
public function __destruct(): void
{
if ($this->connection) {
@ftp_close($this->connection); // @ may fail
}
}


/**
* Connects to FTP server.
* @throws ServerException
Expand Down

0 comments on commit 891e63d

Please sign in to comment.