Skip to content

Commit

Permalink
Change default listen address
Browse files Browse the repository at this point in the history
  • Loading branch information
lava committed Apr 15, 2020
1 parent 6052beb commit 3416052
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,8 @@ Every entry has a category for which we use the following visual abbreviations:

## Unreleased

- 🔄 The default bind address has been changed from `::` to `localhost`.

- 🐞 Archive lookups are now interruptible. This change fixes an issue that
caused consecutive exports to slow down the node, which improves the overall
performance for larger databases considerably.
Expand Down
6 changes: 3 additions & 3 deletions libvast/src/system/start_command.cpp
Expand Up @@ -65,7 +65,7 @@ caf::message start_command_impl(start_command_extra_steps extra_steps,
return caf::make_message(std::move(node_opt.error()));
auto& node = node_opt->get();
// Publish our node.
auto host = node_endpoint.host.empty() ? nullptr : node_endpoint.host.c_str();
auto host = node_endpoint.host.empty() ? "localhost" : node_endpoint.host.c_str();
auto publish = [&]() -> caf::expected<uint16_t> {
if (use_encryption)
#ifdef VAST_USE_OPENSSL
Expand All @@ -80,8 +80,8 @@ caf::message start_command_impl(start_command_extra_steps extra_steps,
auto bound_port = publish();
if (!bound_port)
return caf::make_message(std::move(bound_port.error()));
VAST_INFO_ANON("VAST node is listening on", (host ? host : "")
<< ':' << *bound_port);
auto listen_addr = std::string{host} + ':' + std::to_string(*bound_port);
VAST_INFO_ANON("VAST node is listening on", listen_addr);
// Run user-defined extra code.
if (extra_steps != nullptr)
if (auto err = extra_steps(self, invocation.options, node))
Expand Down
2 changes: 1 addition & 1 deletion libvast/vast/defaults.hpp
Expand Up @@ -285,7 +285,7 @@ constexpr const caf::atom_value server_file_verbosity = caf::atom("debug");
namespace system {

/// Hostname or IP address and port of a remote node.
constexpr std::string_view endpoint = ":42000/tcp";
constexpr std::string_view endpoint = "localhost:42000/tcp";

/// The unique ID of this node.
constexpr std::string_view node_id = "node";
Expand Down

0 comments on commit 3416052

Please sign in to comment.