diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-08-10 09:34:43 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-08-10 09:34:43 +0200 |
| commit | 2d028a0449b4e1e8b1a35ff68f531e5b6ca7c75f (patch) | |
| tree | b3b4df2ce4ae0317bcc9cf9ff4b3521739a76c76 /src/resolver.hh | |
| parent | 2b062ae29bbc86008899c05e807fd9096ed9720d (diff) | |
Resolver didn't work when it was created before fork() and used after
The pipe that resolver sets up to communicate with the threads
gets duplicated by the fork() leading to it all breaking down.
So make it possible to create a Resolver without actually initializing
it so we can do that *after* fork() (fork is called bu daemon())
Diffstat (limited to 'src/resolver.hh')
| -rw-r--r-- | src/resolver.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resolver.hh b/src/resolver.hh index 856f561..319f8b1 100644 --- a/src/resolver.hh +++ b/src/resolver.hh @@ -15,7 +15,9 @@ public: virtual ~Resolver() {} - static Resolver* create(Looper* looper); + static Resolver* create(Looper* looper, bool delay = false); + + virtual bool setup() = 0; virtual void* request(std::string const& host, uint16_t port, Callback const& callback) = 0; |
