|
From: Thue J. K. <th...@gm...> - 2011-01-26 21:53:07
|
It would be nice if it would do something other than hanging indefinitely. Whether that is to try to reconnect, or to unmount, is not so important. Regards, Thue 2011/1/24 Miklos Szeredi <mi...@sz...> > On Fri, 21 Jan 2011, Thue Janus Kristensen wrote: > > If I have an SSHFS-mounted filesystem and the established sftp-connection > > becomes invalid, for example if I restart my router, SSHFS bugs out. For > > example, if I try to do a ls of the mounted directory, the ls hangs > forever. > > > > Why doesn't SSHFS automatically unmount the now invalid mount point, or > at > > least return a read error to ls? > > SSHFS doesn't know, it uses ssh, which in turns uses TCP sockets, > which behave badly in the presense of dynamic IP. > > The solution would be to give sshfs a timeout after which it kills the > hanging ssh connection and starts up a new one. > > Returning an error may not be the right thing, the network might just > be down temporarily. Unfortunately there's no way to differentiate a > temporary network outage from a changed IP address in the router, > which will cause TCP connections to hang "permanently". > > Thanks, > Miklos > |