aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/serialise.hh
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-22 00:57:02 +0100
committereldritch horrors <pennae@lix.systems>2024-03-31 16:42:40 +0000
commit45623f077fdd53eb227bfee94f061835e86742ff (patch)
tree423756e3f51e2df9161f89996a3c6151ab8b0083 /src/libutil/serialise.hh
parentf402c45cfa7d683fb90824cd6f6809184ed88225 (diff)
libutil: drop Fs{Source,Sink}::good
setting this only on exceptions caused by actual fd access is not sufficient to diagnose all errors (such as SerialisationError) in some cases. this usually does not have any negative effects since those errors will end up killing the process in another way. this is not a reliable assumption though and we should be using proper error handling (and closing connections more often, preferring to close over keeping something open that might be in a weird state) Change-Id: I1b792cd7ad8ba9ff0f6bd174945ab2575ff2208e
Diffstat (limited to 'src/libutil/serialise.hh')
-rw-r--r--src/libutil/serialise.hh11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/libutil/serialise.hh b/src/libutil/serialise.hh
index d1c791823..e6290a652 100644
--- a/src/libutil/serialise.hh
+++ b/src/libutil/serialise.hh
@@ -18,7 +18,6 @@ struct Sink
{
virtual ~Sink() { }
virtual void operator () (std::string_view data) = 0;
- virtual bool good() { return true; }
};
/**
@@ -80,8 +79,6 @@ struct Source
*/
virtual size_t read(char * data, size_t len) = 0;
- virtual bool good() { return true; }
-
void drainInto(Sink & sink);
std::string drain();
@@ -136,11 +133,6 @@ struct FdSink : BufferedSink
~FdSink();
void writeUnbuffered(std::string_view data) override;
-
- bool good() override;
-
-private:
- bool _good = true;
};
@@ -165,11 +157,8 @@ struct FdSource : BufferedSource
return *this;
}
- bool good() override;
protected:
size_t readUnbuffered(char * data, size_t len) override;
-private:
- bool _good = true;
};