Skip to content

Commit

Permalink
Fix topfreegames#315, prevents goroutine Leak caused by infinite waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
haoyu234 authored and felipejfc committed Jul 25, 2023
1 parent 19eaca3 commit 7d8b344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/etcd_service_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func (sd *etcdServiceDiscovery) watchLeaseChan(c <-chan *clientv3.LeaseKeepAlive

// renewLease reestablishes connection with etcd
func (sd *etcdServiceDiscovery) renewLease() error {
c := make(chan error)
c := make(chan error, 1)
go func() {
defer close(c)
logger.Log.Infof("waiting for etcd lease")
Expand Down

0 comments on commit 7d8b344

Please sign in to comment.