mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-09 15:58:05 +02:00
Merge pull request #11159 from DeterminateSystems/framedsource-terminate
~FramedSource(): Don't throw an exception if the remote has disconnected
This commit is contained in:
commit
e20b0a5dda
1 changed files with 10 additions and 6 deletions
|
@ -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 a new issue