Test connection

438 views Asked by At

I was curious if anyone knows a way to test a connection with preferable a custom timeout. I have a page where different disks are being indexed for selection in further processing. One disk uses sftp, this disk is stuck at random times so the application cant connect and trows an error.

I am looking for a way to suppress the error and let the user select the other files that can be indexed at the moment.

I use standard laravel storage facade. And tried already something like this:

$disk = Storage::disk($project->category->FileServer->name); $adapter = $disk->getDriver()->getAdapter(); $adapter->connect();

The problem with this is that connect always trow null.

0

There are 0 answers