thephpleague / flysystem

Abstraction for local and remote filesystems
https://flysystem.thephpleague.com
MIT License
13.23k stars 825 forks source link

SimpleConnectivityChecker causes unexpected behavior when use the ping method to check connectivity #1776

Closed gmorgas closed 2 months ago

gmorgas commented 2 months ago

Bug Report

Q A
Flysystem Version 3.25.0
Adapter Name flysystem-adapter-sftp3
Adapter version 3.25.0

Summary

Error Message: Unable to list contents for '', shallow listing\n\nReason: Expected NET_SFTP_HANDLE or NET_SFTP_STATUS. Got packet type:

Since upgrading from 3.23.1 to 3.25.0 related to "Add ability to proactively close FTP and SFTP connections.", without using ping to check the connection, they work without a problem. The problematic part in ping method is close_channel.

Solution Revert this change and use previous check.

frankdejonge commented 2 months ago

Next minor version will revert the behaviour, making the ping usage an opt-in feature instead.