• Chen Tianjie's avatar
    Hide the comma after cport when there is no hostname. (#12411) · 91011100
    Chen Tianjie authored
    According to the format shown in https://redis.io/commands/cluster-nodes/
    ```
    <ip:port@cport[,hostname[,auxiliary_field=value]*]>
    ```
    when there is no hostname, and the auxiliary fields are hidden, the cluster topology should be
    ```
    <ip:port@cport>
    ```
    However in the code we always print the hostname even when it is an empty string, leaving an unnecessary comma tailing after cport, which is weird and conflicts with the doc.
    ```
    94ca2f6cf85228a49fde7b738ee1209de7bee325 127.0.0.1:6379@16379, myself,master - 0 0 0 connected 0-16383
    ```
    91011100
cluster.c 301 KB