1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 09:31:16 +02:00

Print a more helpful message if the daemon crashes

Instead of

   error: unexpected end-of-file

you now get

   error: Nix daemon disconnected unexpectedly (maybe it crashed?)
This commit is contained in:
Eelco Dolstra 2024-01-17 22:19:51 +01:00
parent b5ed36e663
commit a3cf27ca47
3 changed files with 5 additions and 3 deletions

View file

@ -67,6 +67,7 @@ void RemoteStore::initConnection(Connection & conn)
{
/* Send the magic greeting, check for the reply. */
try {
conn.from.endOfFileError = "Nix daemon disconnected unexpectedly (maybe it crashed?)";
conn.to << WORKER_MAGIC_1;
conn.to.flush();
StringSink saved;