mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-25 15:26:17 +02: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
1 changed files with 10 additions and 6 deletions
|
@ -483,13 +483,17 @@ struct FramedSource : Source
|
||||||
|
|
||||||
~FramedSource()
|
~FramedSource()
|
||||||
{
|
{
|
||||||
if (!eof) {
|
try {
|
||||||
while (true) {
|
if (!eof) {
|
||||||
auto n = readInt(from);
|
while (true) {
|
||||||
if (!n) break;
|
auto n = readInt(from);
|
||||||
std::vector<char> data(n);
|
if (!n) break;
|
||||||
from(data.data(), n);
|
std::vector<char> data(n);
|
||||||
|
from(data.data(), n);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch (...) {
|
||||||
|
ignoreException();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue