diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-11-27 13:30:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-27 13:30:26 +0100 |
commit | cc308ee93d5b2027e1270295daa860fd73b71917 (patch) | |
tree | 836df800b9abeb9e6e1d7d659bab1d902767805d /src/libstore | |
parent | 534332c8a03b64161ec795d1deb2ba3d48f27be1 (diff) | |
parent | 5b798f6caeab64854394e1250e30aab91241cf26 (diff) |
Merge pull request #7353 from edolstra/gc-shutdown
Fix random client failures during GC server shutdown
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/gc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index 9ef8972f3..5d91829f1 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -147,7 +147,7 @@ void LocalStore::addTempRoot(const StorePath & path) } catch (SysError & e) { /* The garbage collector may have exited, so we need to restart. */ - if (e.errNo == EPIPE) { + if (e.errNo == EPIPE || e.errNo == ECONNRESET) { debug("GC socket disconnected"); state->fdRootsSocket.close(); goto restart; @@ -506,6 +506,7 @@ void LocalStore::collectGarbage(const GCOptions & options, GCResults & results) Finally cleanup([&]() { debug("GC roots server shutting down"); + fdServer.close(); while (true) { auto item = remove_begin(*connections.lock()); if (!item) break; |