mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 09:06:15 +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,6 +483,7 @@ struct FramedSource : Source
|
||||||
|
|
||||||
~FramedSource()
|
~FramedSource()
|
||||||
{
|
{
|
||||||
|
try {
|
||||||
if (!eof) {
|
if (!eof) {
|
||||||
while (true) {
|
while (true) {
|
||||||
auto n = readInt(from);
|
auto n = readInt(from);
|
||||||
|
@ -491,6 +492,9 @@ struct FramedSource : Source
|
||||||
from(data.data(), n);
|
from(data.data(), n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (...) {
|
||||||
|
ignoreException();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t read(char * data, size_t len) override
|
size_t read(char * data, size_t len) override
|
||||||
|
|
Loading…
Reference in a new issue