diff options
author | Alex Auvolat <alex@adnab.me> | 2024-02-19 10:58:54 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2024-02-19 11:45:44 +0100 |
commit | f0bbad2db95b00ec429f498fe15f1007bd87da5e (patch) | |
tree | 1000524d2bc1a6c4bfb5b198c8f7242927b81c6a /src/rpc/system.rs | |
parent | b8217361c05883a839996a7db24be71c601e428f (diff) | |
download | garage-f0bbad2db95b00ec429f498fe15f1007bd87da5e.tar.gz garage-f0bbad2db95b00ec429f498fe15f1007bd87da5e.zip |
[networking-fixes] use rpc_public_addr in netapp's HelloMessage
Diffstat (limited to 'src/rpc/system.rs')
-rw-r--r-- | src/rpc/system.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rpc/system.rs b/src/rpc/system.rs index de44e656..5c6e07b1 100644 --- a/src/rpc/system.rs +++ b/src/rpc/system.rs @@ -98,7 +98,6 @@ pub struct System { system_endpoint: Arc<Endpoint<SystemRpc, System>>, rpc_listen_addr: SocketAddr, - #[cfg(any(feature = "consul-discovery", feature = "kubernetes-discovery"))] rpc_public_addr: Option<SocketAddr>, bootstrap_peers: Vec<String>, @@ -369,7 +368,6 @@ impl System { replication_mode, replication_factor, rpc_listen_addr: config.rpc_bind_addr, - #[cfg(any(feature = "consul-discovery", feature = "kubernetes-discovery"))] rpc_public_addr, bootstrap_peers: config.bootstrap_peers.clone(), #[cfg(feature = "consul-discovery")] @@ -390,9 +388,11 @@ impl System { /// Perform bootstraping, starting the ping loop pub async fn run(self: Arc<Self>, must_exit: watch::Receiver<bool>) { join!( - self.netapp - .clone() - .listen(self.rpc_listen_addr, None, must_exit.clone()), + self.netapp.clone().listen( + self.rpc_listen_addr, + self.rpc_public_addr, + must_exit.clone() + ), self.peering.clone().run(must_exit.clone()), self.discovery_loop(must_exit.clone()), self.status_exchange_loop(must_exit.clone()), |