public function disconnect()
    {
        for ($i = 0; $i < $this->getParam('retryAttempts') + 1; $i++) {
            $res = @ftp_close($this->connection);

            if (false !== $res) {
                $this->connection = null;
                break;
            }
        }

        return $this;
    }