1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

~FramedSource(): Don't throw an exception if the remote has disconnected

This would cause the daemon to crash with a call to terminate().
This commit is contained in:
Eelco Dolstra 2024-07-23 10:56:29 +02:00
parent babfd0cd99
commit 498eed0a25

View file

@ -483,6 +483,7 @@ struct FramedSource : Source
~FramedSource()
{
try {
if (!eof) {
while (true) {
auto n = readInt(from);
@ -491,6 +492,9 @@ struct FramedSource : Source
from(data.data(), n);
}
}
} catch (...) {
ignoreException();
}
}
size_t read(char * data, size_t len) override