mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 07:46:21 +02:00
parent
6d30f9e6fe
commit
05fcc681ac
1 changed files with 11 additions and 1 deletions
|
@ -126,7 +126,17 @@ void LocalStore::addTempRoot(const StorePath & path)
|
||||||
auto socketPath = stateDir.get() + gcSocketPath;
|
auto socketPath = stateDir.get() + gcSocketPath;
|
||||||
debug("connecting to '%s'", socketPath);
|
debug("connecting to '%s'", socketPath);
|
||||||
state->fdRootsSocket = createUnixDomainSocket();
|
state->fdRootsSocket = createUnixDomainSocket();
|
||||||
|
try {
|
||||||
nix::connect(state->fdRootsSocket.get(), socketPath);
|
nix::connect(state->fdRootsSocket.get(), socketPath);
|
||||||
|
} catch (SysError & e) {
|
||||||
|
/* The garbage collector may have exited, so we need to
|
||||||
|
restart. */
|
||||||
|
if (e.errNo == ECONNREFUSED) {
|
||||||
|
debug("GC socket connection refused");
|
||||||
|
state->fdRootsSocket.close();
|
||||||
|
goto restart;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue