diff options
author | DevineLiu <23489096+DevineLiu@users.noreply.github.com> | 2022-11-26 10:01:01 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-25 18:01:01 -0800 |
commit | 25ffa79b649d0c4285c3667c1eae9b118514e0eb (patch) | |
tree | e85d37d0a01bcd2be826e54db5df76a7d6f6e7c9 /src/cluster.c | |
parent | abf70309eb42674982ea51ed41ff5b39b04fe701 (diff) | |
download | redis-25ffa79b649d0c4285c3667c1eae9b118514e0eb.tar.gz |
[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 <madelyneolson@gmail.com>
Diffstat (limited to 'src/cluster.c')
-rw-r--r-- | src/cluster.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) { |