Skip to content

Commit

Permalink
bugFix: fix info_replica_addr interface if listen_port is not set.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaofan8421 committed Sep 20, 2023
1 parent 3dab859 commit b7df06e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/redis_connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Connection : public EvbufCallbackBase<Connection> {
void SetAnnounceIP(std::string ip) { announce_ip_ = std::move(ip); }
std::string GetAnnounceIP() const { return !announce_ip_.empty() ? announce_ip_ : ip_; }
uint32_t GetAnnouncePort() const { return listening_port_ != 0 ? listening_port_ : port_; }
std::string GetAnnounceAddr() const { return GetAnnounceIP() + ":" + std::to_string(listening_port_); }
std::string GetAnnounceAddr() const { return GetAnnounceIP() + ":" + std::to_string(GetAnnouncePort()); }
uint64_t GetClientType() const;
Server *GetServer() { return svr_; }

Expand Down

0 comments on commit b7df06e

Please sign in to comment.