summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/proxy.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/proxy.cc b/src/proxy.cc
index bd90567..522454a 100644
--- a/src/proxy.cc
+++ b/src/proxy.cc
@@ -271,6 +271,17 @@ public:
setup();
}
~ProxyImpl() override {
+ while (true) {
+ auto it = clients_.begin();
+ if (it == clients_.end()) break;
+ close_client(it.index());
+ }
+ while (true) {
+ auto it = monitors_.begin();
+ if (it == monitors_.end()) break;
+ close_monitor(it.index());
+ }
+
if (accept_socket_) {
looper_->remove(accept_socket_.get());
}