mirror of
https://github.com/NixOS/nix.git
synced 2025-02-16 17:02:28 +00: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:
parent
babfd0cd99
commit
498eed0a25
@ -483,13 +483,17 @@ struct FramedSource : Source
|
||||
|
||||
~FramedSource()
|
||||
{
|
||||
if (!eof) {
|
||||
while (true) {
|
||||
auto n = readInt(from);
|
||||
if (!n) break;
|
||||
std::vector<char> data(n);
|
||||
from(data.data(), n);
|
||||
try {
|
||||
if (!eof) {
|
||||
while (true) {
|
||||
auto n = readInt(from);
|
||||
if (!n) break;
|
||||
std::vector<char> data(n);
|
||||
from(data.data(), n);
|
||||
}
|
||||
}
|
||||
} catch (...) {
|
||||
ignoreException();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user