summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-02-19 00:39:33 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-02-19 00:39:33 +0000
commit1c6cb1da4ee0ff5cb13ae8e2460cf4677833f1bf (patch)
treeff75f53904c6b465d5652093c0418e7e4f1c3718
parentFix error message (diff)
downloadnetfs-1c6cb1da4ee0ff5cb13ae8e2460cf4677833f1bf.tar.bz2
netfs-1c6cb1da4ee0ff5cb13ae8e2460cf4677833f1bf.tar.xz
netfs-1c6cb1da4ee0ff5cb13ae8e2460cf4677833f1bf.zip
Tear down adapter on daemon destruction
-rw-r--r--netfs/daemon/daemon.cpp5
-rw-r--r--netfs/daemon/daemon.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/netfs/daemon/daemon.cpp b/netfs/daemon/daemon.cpp
index cf312bb..b5a2ddd 100644
--- a/netfs/daemon/daemon.cpp
+++ b/netfs/daemon/daemon.cpp
@@ -13,6 +13,11 @@ NetFSDaemon::NetFSDaemon(const Ice::CommunicatorPtr & i) :
{
}
+NetFSDaemon::~NetFSDaemon()
+{
+ adapter->deactivate();
+}
+
std::string
NetFSDaemon::hostname()
{
diff --git a/netfs/daemon/daemon.h b/netfs/daemon/daemon.h
index 8cf4d4a..7ed5cb4 100644
--- a/netfs/daemon/daemon.h
+++ b/netfs/daemon/daemon.h
@@ -10,6 +10,7 @@
class NetFSDaemon : public IceBox::Service {
public:
NetFSDaemon(const Ice::CommunicatorPtr &);
+ virtual ~NetFSDaemon();
virtual void start(const std::string&, const Ice::CommunicatorPtr&, const Ice::StringSeq&) override;
virtual void stop() override;