Fix main GC thread exiting

This commit is contained in:
Eelco Dolstra 2021-10-15 16:36:48 +02:00
parent e0936ae38f
commit ac54c6faa6

View file

@ -538,8 +538,10 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results)
Finally cleanup([&]() { Finally cleanup([&]() {
auto conn(connections.lock()); auto conn(connections.lock());
auto i = conn->find(fdClient.get()); auto i = conn->find(fdClient.get());
if (i != conn->end()) {
i->second.detach(); i->second.detach();
conn->erase(i); conn->erase(i);
}
}); });
while (true) { while (true) {