aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/nfs/Connection.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-14 23:27:57 +0100
committerMax Kellermann <max@duempel.org>2014-12-15 00:05:53 +0100
commit82da364b8b9c6073e4af58cddc85357674a1a2e5 (patch)
treeefc4480573eef2d434b51c6d41103a558fb9d884 /src/lib/nfs/Connection.hxx
parent7fa91ec175452823e04dba199bc48df12d3a64f0 (diff)
downloadmpd-82da364b8b9c6073e4af58cddc85357674a1a2e5.tar.gz
mpd-82da364b8b9c6073e4af58cddc85357674a1a2e5.tar.xz
mpd-82da364b8b9c6073e4af58cddc85357674a1a2e5.zip
lib/nfs/Connection: implement mount timeout
Diffstat (limited to 'src/lib/nfs/Connection.hxx')
-rw-r--r--src/lib/nfs/Connection.hxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/nfs/Connection.hxx b/src/lib/nfs/Connection.hxx
index 310ccdc44..3969a7e8f 100644
--- a/src/lib/nfs/Connection.hxx
+++ b/src/lib/nfs/Connection.hxx
@@ -23,6 +23,7 @@
#include "Lease.hxx"
#include "Cancellable.hxx"
#include "event/SocketMonitor.hxx"
+#include "event/TimeoutMonitor.hxx"
#include "event/DeferredMonitor.hxx"
#include "util/Error.hxx"
@@ -40,7 +41,7 @@ class NfsCallback;
/**
* An asynchronous connection to a NFS server.
*/
-class NfsConnection : SocketMonitor, DeferredMonitor {
+class NfsConnection : SocketMonitor, TimeoutMonitor, DeferredMonitor {
class CancellableCallback : public CancellablePointer<NfsCallback> {
NfsConnection &connection;
@@ -142,7 +143,8 @@ public:
gcc_nonnull_all
NfsConnection(EventLoop &_loop,
const char *_server, const char *_export_name)
- :SocketMonitor(_loop), DeferredMonitor(_loop),
+ :SocketMonitor(_loop), TimeoutMonitor(_loop),
+ DeferredMonitor(_loop),
server(_server), export_name(_export_name),
context(nullptr) {}
@@ -227,6 +229,9 @@ private:
/* virtual methods from SocketMonitor */
virtual bool OnSocketReady(unsigned flags) override;
+ /* virtual methods from TimeoutMonitor */
+ void OnTimeout() final;
+
/* virtual methods from DeferredMonitor */
virtual void RunDeferred() override;
};