mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 08:38:27 -05:00
Cluster announce port: set port/bport for myself at startup.
This commit is contained in:
parent
1c038379f7
commit
4abf486ca3
@ -474,9 +474,14 @@ void clusterInit(void) {
|
|||||||
/* The slots -> keys map is a sorted set. Init it. */
|
/* The slots -> keys map is a sorted set. Init it. */
|
||||||
server.cluster->slots_to_keys = zslCreate();
|
server.cluster->slots_to_keys = zslCreate();
|
||||||
|
|
||||||
/* Set myself->port to my listening port, we'll just need to discover
|
/* Set myself->port / cport to my listening ports, we'll just need to
|
||||||
* the IP address via MEET messages. */
|
* discover the IP address via MEET messages. */
|
||||||
myself->port = server.port;
|
myself->port = server.port;
|
||||||
|
myself->cport = server.port+CLUSTER_PORT_INCR;
|
||||||
|
if (server.cluster_announce_port)
|
||||||
|
myself->port = server.cluster_announce_port;
|
||||||
|
if (server.cluster_announce_bus_port)
|
||||||
|
myself->cport = server.cluster_announce_bus_port;
|
||||||
|
|
||||||
server.cluster->mf_end = 0;
|
server.cluster->mf_end = 0;
|
||||||
resetManualFailover();
|
resetManualFailover();
|
||||||
|
Loading…
Reference in New Issue
Block a user