diff options
Diffstat (limited to 'src/libstore/remote-store.hh')
-rw-r--r-- | src/libstore/remote-store.hh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libstore/remote-store.hh b/src/libstore/remote-store.hh index b488e34ce263..7f9d7d1f56d6 100644 --- a/src/libstore/remote-store.hh +++ b/src/libstore/remote-store.hh @@ -14,6 +14,7 @@ class Pid; struct FdSink; struct FdSource; template<typename T> class Pool; +struct ConnectionHandle; /* FIXME: RemoteStore is a misnomer - should be something like @@ -103,6 +104,7 @@ protected: struct Connection { + AutoCloseFD fd; FdSink to; FdSource from; unsigned int daemonVersion; @@ -110,7 +112,7 @@ protected: virtual ~Connection(); - void processStderr(Sink * sink = 0, Source * source = 0); + std::exception_ptr processStderr(Sink * sink = 0, Source * source = 0); }; ref<Connection> openConnectionWrapper(); @@ -123,6 +125,10 @@ protected: virtual void setOptions(Connection & conn); + ConnectionHandle getConnection(); + + friend class ConnectionHandle; + private: std::atomic_bool failed{false}; @@ -140,11 +146,6 @@ public: private: - struct Connection : RemoteStore::Connection - { - AutoCloseFD fd; - }; - ref<RemoteStore::Connection> openConnection() override; std::experimental::optional<std::string> path; }; |