Skip to content
Snippets Groups Projects
Commit ba51100d authored by Eelco Dolstra's avatar Eelco Dolstra
Browse files

Get rid of UDSRemoteStore::Connection

Since its superclass RemoteStore::Connection contains 'to' and 'from'
fields that refer to the file descriptor maintained in the subclass,
it was possible for the flush() call in Connection::~Connection() to
write to a closed file descriptor (or worse, a file descriptor now
referencing another file). So make sure that the file descriptor
survives 'to' and 'from'.
parent 9617a043
No related branches found
No related tags found
No related merge requests found
......@@ -103,6 +103,7 @@ protected:
struct Connection
{
AutoCloseFD fd;
FdSink to;
FdSource from;
unsigned int daemonVersion;
......@@ -140,11 +141,6 @@ public:
private:
struct Connection : RemoteStore::Connection
{
AutoCloseFD fd;
};
ref<RemoteStore::Connection> openConnection() override;
std::experimental::optional<std::string> path;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment