On my laptop, I often mount the content of my NAS through sshfs, for ease of access. I usually do so with an ethernet cable plugged in, as it makes browsing the files more smooth than with wifi. But sometime, I need to unplug, while still being connected to the same network through wifi. However, this makes sshfs unresponsive ; any attempt to access the content of the nas directory freezes until I either plug the Ethernet cable again, or kill sshfs, in which case I have to unmount, then mount again. The main issue is that unmounting requires me to close the half-dozen terminals that are already in the nas directory.
One solution would be to force sshfs to use the wifi connection even when connected to the ethernet. (ssh has an option for that, so I assume sshfs as well.) However, I would lose the benefit of smooth browsing, and some movies become entirely unwatchable.
So is there any method so that sshfs can use either wifi or ethernet depending on which is available, without having to unmount and remount ? (Or another command entirely that performs a similar function and does what I want.)