summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-07-26 23:49:24 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-07-26 23:49:24 +0200
commit51eb2a97303491ccbf446fd13c7dbed5bf6f9952 (patch)
treee353818df49616965fcda4ae77fee5a9b44b245e
parent68f7c176565452c5bddf8c20d01a59187ca61a30 (diff)
Reset Monitor at new connection
-rw-r--r--src/monitor.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/monitor.cc b/src/monitor.cc
index 9b57141..ba95596 100644
--- a/src/monitor.cc
+++ b/src/monitor.cc
@@ -23,7 +23,7 @@ public:
state_(DISCONNECTED) {
}
- ~MonitorImpl() {
+ ~MonitorImpl() override {
do_disconnect(true);
}
@@ -116,6 +116,7 @@ private:
out_->clear();
}
content_skip_ = 0;
+ active_attach_.reset();
looper_->add(sock_.get(), Looper::EVENT_WRITE,
std::bind(&MonitorImpl::event, this, std::placeholders::_1,
std::placeholders::_2));