Skip to content

Commit b31b197

Browse files
committed
Change channel type
1 parent f2bd92b commit b31b197

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

node.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type Node struct {
1616

1717
cluster *Cluster
1818
pool *Pool
19-
refreshDoneChan chan bool
19+
refreshDoneChan chan struct{}
2020

2121
mu sync.RWMutex
2222
closed bool
@@ -31,7 +31,7 @@ func newNode(id string, aliases []Host, cluster *Cluster, pool *Pool) *Node {
3131
cluster: cluster,
3232
pool: pool,
3333
health: 100,
34-
refreshDoneChan: make(chan bool),
34+
refreshDoneChan: make(chan struct{}),
3535
}
3636
// Start node refresh loop
3737
refreshInterval := cluster.opts.NodeRefreshInterval
@@ -79,7 +79,7 @@ func (n *Node) Close(optArgs ...CloseOpts) error {
7979
}
8080
}
8181

82-
n.refreshDoneChan <- true
82+
n.refreshDoneChan <- struct{}{}
8383
if n.pool != nil {
8484
n.pool.Close()
8585
}

0 commit comments

Comments
 (0)