mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-18 08:07:17 +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,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
|
||||
|
|
Loading…
Add table
Reference in a new issue