Uploader/Uploader.php
private function reconnectDistantFs($key)
    {
        /** @noinspection PhpUnusedLocalVariableInspection */
        list($prefix, $args) = $this->mountManager->filterPrefix([$key]);

        /** @var \League\Flysystem\FileSystem $fs */
        $fs = $this->mountManager->getFilesystem($prefix);
        $adapter = $fs->getAdapter();

        // Try reconnection
        if (!$adapter instanceof AbstractFtpAdapter) {
            return false;
        }

        $adapter->disconnect();
        sleep(1);
        $adapter->connect();

        return true;
    }
private function reconnectDistantFs($key)
    {
        /** @noinspection PhpUnusedLocalVariableInspection */
        list($prefix, $args) = $this->mountManager->filterPrefix([$key]);

        /** @var \League\Flysystem\FileSystem $fs */
        $fs = $this->mountManager->getFilesystem($prefix);
        $adapter = $fs->getAdapter();

        // Try reconnection
        if (!$adapter instanceof AbstractFtpAdapter) {
            return false;
        }

        $adapter->disconnect();
        sleep(1);
        $adapter->connect();

        return true;
    }
Reconnects the file system adapter if possible.

@param string $key
@return bool