mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Merge branch 'master' into tds
This commit is contained in:
commit
160e64fbf3
1 changed files with 5 additions and 0 deletions
|
|
@ -66,6 +66,11 @@ func (l *leasedKV) Start(initValue string) error {
|
|||
|
||||
func (l *leasedKV) create(initValue string) (<-chan *clientv3.LeaseKeepAliveResponse, error) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
if l.cancel != nil {
|
||||
l.cancel()
|
||||
}
|
||||
|
||||
l.cancel = cancel
|
||||
|
||||
leaseResp, err := l.cli.Grant(ctx, l.ttlSeconds)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue