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([&]() {
auto conn(connections.lock());
auto i = conn->find(fdClient.get());
i->second.detach();
conn->erase(i);
if (i != conn->end()) {
i->second.detach();
conn->erase(i);
}
});
while (true) {