From 25ffa79b649d0c4285c3667c1eae9b118514e0eb Mon Sep 17 00:00:00 2001 From: DevineLiu <23489096+DevineLiu@users.noreply.github.com> Date: Sat, 26 Nov 2022 10:01:01 +0800 Subject: [BUG] Fix announced ports not updating on local node when updated at runtime (#10745) The cluster-announce-port/cluster-announce-bus-port/cluster-announce-tls-port should take effect at runtime Co-authored-by: Madelyn Olson --- src/cluster.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/cluster.c') diff --git a/src/cluster.c b/src/cluster.c index 45e7bf92a..499daf687 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -753,6 +753,14 @@ void clusterUpdateMyselfFlags(void) { } +/* We want to take myself->port/cport/pport in sync with the +* cluster-announce-port/cluster-announce-bus-port/cluster-announce-tls-port option. +* The option can be set at runtime via CONFIG SET. */ +void clusterUpdateMyselfAnnouncedPorts(void) { + if (!myself) return; + deriveAnnouncedPorts(&myself->port,&myself->pport,&myself->cport); +} + /* We want to take myself->ip in sync with the cluster-announce-ip option. * The option can be set at runtime via CONFIG SET. */ void clusterUpdateMyselfIp(void) { -- cgit v1.2.1