Skip to content

Commit

Permalink
Fix injector: don't fail if --listen-on-tcp not set
Browse files Browse the repository at this point in the history
  • Loading branch information
inetic committed Jan 8, 2018
1 parent 565c33b commit 7c3ca08
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/injector.cpp
Expand Up @@ -199,6 +199,7 @@ void listen_gnunet( asio::io_service& ios

sys::error_code ec;

cout << "Setting up GNUnet..." << endl;
service.async_setup(yield[ec]);

if (ec) {
Expand Down Expand Up @@ -293,9 +294,6 @@ int main(int argc, char* argv[])
return 1;
}

auto const injector_ep
= util::parse_endpoint(vm["listen-on-tcp"].as<string>());

if (vm.count("open-file-limit")) {
increase_open_file_limit(vm["open-file-limit"].as<unsigned int>());
}
Expand All @@ -308,6 +306,9 @@ int main(int argc, char* argv[])
std::cout << "IPNS DB: " << ipfs_cache_injector.ipns_id() << endl;

if (vm.count("listen-on-tcp")) {
auto const injector_ep
= util::parse_endpoint(vm["listen-on-tcp"].as<string>());

asio::spawn
( ios
, [&](asio::yield_context yield) {
Expand Down

0 comments on commit 7c3ca08

Please sign in to comment.