Skip to content

Commit

Permalink
pkg/pdutil(ticdc): fix a dead lock issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 committed Sep 26, 2022
1 parent d32cbe8 commit 69406c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/pdutil/clock.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type clock struct {
sync.RWMutex
// The time encoded in PD ts.
tsEventTime time.Time
// The time we receives PD ts.
// The time we receive PD ts.
tsProcessingTime time.Time
err error
}
Expand Down Expand Up @@ -120,8 +120,8 @@ func (c *clock) CurrentTime() (time.Time, error) {
// Stop clock.
func (c *clock) Stop() {
c.mu.Lock()
defer c.mu.Unlock()
c.cancel()
c.mu.Unlock()
<-c.stopCh
}

Expand Down

0 comments on commit 69406c2

Please sign in to comment.