summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netfs/fuse/fuseApp.cpp11
-rw-r--r--netfs/fuse/fuseApp.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/netfs/fuse/fuseApp.cpp b/netfs/fuse/fuseApp.cpp
index 734bf91..41f86ef 100644
--- a/netfs/fuse/fuseApp.cpp
+++ b/netfs/fuse/fuseApp.cpp
@@ -166,10 +166,10 @@ NetFS::FuseApp::connectToService()
}
void
-NetFS::FuseApp::connectToVolume()
+NetFS::FuseApp::connectToVolume(bool force)
{
Lock(_lock);
- if (!volume) {
+ if (force || !volume) {
volume = service->connect(fcr->ExportName, fcr->AuthToken);
if (!volume) {
throw std::runtime_error("Invalid filesystem proxy");
@@ -238,7 +238,7 @@ NetFS::FuseApp::onError(const std::exception & e) noexcept
verifyConnection();
connectSession();
connectToService();
- connectToVolume();
+ connectToVolume(false);
connectHandles();
return 0;
}
@@ -248,8 +248,7 @@ NetFS::FuseApp::onError(const std::exception & e) noexcept
}
if (dynamic_cast<const Ice::RequestFailedException *>(&e)) {
try {
- volume = nullptr;
- connectToVolume();
+ connectToVolume(true);
connectHandles();
return 0;
}
@@ -268,7 +267,7 @@ NetFS::FuseApp::beforeOperation()
{
connectSession();
connectToService();
- connectToVolume();
+ connectToVolume(false);
}
NetFS::ReqEnv
diff --git a/netfs/fuse/fuseApp.h b/netfs/fuse/fuseApp.h
index d373e94..80deed2 100644
--- a/netfs/fuse/fuseApp.h
+++ b/netfs/fuse/fuseApp.h
@@ -38,7 +38,7 @@ namespace NetFS {
protected:
void connectSession();
virtual void connectToService();
- void connectToVolume();
+ void connectToVolume(bool force);
void connectHandles();
void verifyConnection();