mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #16204 from kensou97/release-3.5
[3.5] clientv3: create keepAliveCtxCloser goroutine only if ctx can be canc…
This commit is contained in:
commit
c7d9708387
@ -294,7 +294,9 @@ func (l *lessor) KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAl
|
||||
}
|
||||
l.mu.Unlock()
|
||||
|
||||
go l.keepAliveCtxCloser(ctx, id, ka.donec)
|
||||
if ctx.Done() != nil {
|
||||
go l.keepAliveCtxCloser(ctx, id, ka.donec)
|
||||
}
|
||||
l.firstKeepAliveOnce.Do(func() {
|
||||
go l.recvKeepAliveLoop()
|
||||
go l.deadlineLoop()
|
||||
|
Loading…
x
Reference in New Issue
Block a user