Panic when calling BackgroundSession::join
I'm sometimes experiencing panics like this when calling BackgroundSession::join:
called `Result::unwrap()` on an `Err` value: Os { code: 103, kind: ConnectionAborted, message: "Software caused connection abort" }
It seems that what triggers it is when the session is being joined and the mounted filesystem is being accessed more or less concurrently. I'm not sure whether this is a bug or not. I can imagine the error simply means the sending half of the internal channel has been closed, but I'm not sure. If that was the case, then this error should probably be handled inside Session::run. Or at least propagated to the caller of join so they can decide what to do with it.
Since the Session loop doesn't know that Unmount has occurred until it tries and fails to communicate with the fuse device, an error is all but guaranteed. The first step should be to replace the panicking unwrap in join() with a simple log message. The next step should be to give the application a way to signal to the Session that a graceful stop is requested, so that we can avoid abusing the fuse device to communicate this information.