joao-r-reis commented on code in PR #1858:
URL: 
https://github.com/apache/cassandra-gocql-driver/pull/1858#discussion_r1943074753


##########
host_source.go:
##########
@@ -224,18 +234,20 @@ func (h *HostInfo) ConnectAddress() net.IP {
        h.mu.RLock()
        defer h.mu.RUnlock()
 
-       if addr, _ := h.connectAddressLocked(); validIpAddr(addr) {
-               return addr
-       }
-       panic(fmt.Sprintf("no valid connect address for host: %v. Is your 
cluster configured correctly?", h))
+       addr, _ := h.connectAddressLocked()
+       return addr
 }
 
-func (h *HostInfo) SetConnectAddress(address net.IP) *HostInfo {
-       // TODO(zariel): should this not be exported?
+func (h *HostInfo) SetConnectAddress(address net.IP) (*HostInfo, error) {

Review Comment:
   I honestly think we should just remove this method, what do you think 
@jameshartig ? Allowing users to just modify the connect address on a host is 
weird, there's already an `AddressTranslator` interface for this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to