File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -222,17 +222,6 @@ func (c *Cluster) connectNodes(hosts []Host) {
222222 }
223223 defer conn .Close ()
224224
225- svrRsp , err := conn .Server ()
226- if err != nil {
227- Log .Warnf ("Error fetching server ID: %s" , err )
228- continue
229- }
230-
231- // TODO: connect to seed hosts using `.Server()` to get server ID. Need
232- // some way of making this backwards compatible
233-
234- // TODO: AFTER try to discover hosts
235-
236225 if c .opts .DiscoverHosts {
237226 q , err := newQuery (
238227 DB ("rethinkdb" ).Table ("server_status" ),
@@ -271,6 +260,12 @@ func (c *Cluster) connectNodes(hosts []Host) {
271260 }
272261 }
273262 } else {
263+ svrRsp , err := conn .Server ()
264+ if err != nil {
265+ Log .Warnf ("Error fetching server ID: %s" , err )
266+ continue
267+ }
268+
274269 node , err := c .connectNode (svrRsp .ID , []Host {host })
275270 if err == nil {
276271 if _ , ok := nodeSet [node .ID ]; ! ok {
You can’t perform that action at this time.
0 commit comments