Skip to content

Commit 46255fb

Browse files
committed
Close FTP connection
1 parent 9e4994d commit 46255fb

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Deployment/FtpServer.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ public function __construct(
5454
$this->passiveMode = $passiveMode;
5555
}
5656

57+
function __destruct()
58+
{
59+
if ($this->connection) { // reconnect?
60+
@ftp_close($this->connection); // @ may fail
61+
}
62+
}
63+
5764

5865
/**
5966
* Connects to FTP server.

0 commit comments

Comments
 (0)