improve code quality

This commit is contained in:
Astone
2019-12-03 15:25:58 +08:00
parent b5d65305db
commit 29fb58db39
20 changed files with 67 additions and 89 deletions

View File

@@ -49,9 +49,7 @@ func (e *etcdLock) Acquire(id string, opts ...lock.AcquireOption) error {
m := cc.NewMutex(s, path)
ctx, _ := context.WithCancel(context.Background())
if err := m.Lock(ctx); err != nil {
if err := m.Lock(context.TODO()); err != nil {
return err
}