aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-05 02:07:19 +0100
committerMax Kellermann <max@duempel.org>2014-01-05 02:07:49 +0100
commit4c705334fa2e19155d7949286f0ad3857921f35a (patch)
tree2f709212ef25ec7f5afdfd312c9df1cf5051097e /src
parentc12da599b9c4adbc1e08d48f1f4f2103befca286 (diff)
downloadmpd-4c705334fa2e19155d7949286f0ad3857921f35a.tar.gz
mpd-4c705334fa2e19155d7949286f0ad3857921f35a.tar.xz
mpd-4c705334fa2e19155d7949286f0ad3857921f35a.zip
ClientList: use "delete" instead of Client::Close()
Client::Close() installs a TimeoutMonitor, which is not something we should do during shutdown.
Diffstat (limited to 'src')
-rw-r--r--src/ClientList.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ClientList.cxx b/src/ClientList.cxx
index 37e6f1289..c530ff54a 100644
--- a/src/ClientList.cxx
+++ b/src/ClientList.cxx
@@ -40,8 +40,14 @@ ClientList::Remove(Client &client)
void
ClientList::CloseAll()
{
- while (!list.empty())
- list.front()->Close();
+ while (!list.empty()) {
+ delete list.front();
+ list.pop_front();
+
+#ifndef NDEBUG
+ --size;
+#endif
+ }
assert(size == 0);
}