From 8de875e9eab38090d906ed6c993157ed8723ba67 Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Wed, 7 Sep 2016 20:09:40 +0100 Subject: [PATCH] Configure DNS servers once Android boot is done --- src/anbox/cmds/run.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/anbox/cmds/run.cpp b/src/anbox/cmds/run.cpp index 3de4d45..567fa66 100644 --- a/src/anbox/cmds/run.cpp +++ b/src/anbox/cmds/run.cpp @@ -121,13 +121,14 @@ anbox::cmds::Run::Run(const BusFactory& bus_factory) // more than one one day we need proper dispatching to the right one. android_api_stub->set_rpc_channel(rpc_channel); - dispatcher->dispatch([&]() { - // FIXME make this configurable or once we have a bridge let the host - // act as a DNS proxy. - android_api_stub->set_dns_servers("anbox", std::vector{ "8.8.8.8" }); - }); - auto server = std::make_shared(pending_calls); + server->on_boot_finished([&]() { + dispatcher->dispatch([&]() { + // FIXME make this configurable or once we have a bridge let the host + // act as a DNS proxy. + android_api_stub->set_dns_servers("anbox", std::vector{ "8.8.8.8" }); + }); + }); return std::make_shared(sender, server, pending_calls); }));