Merge pull request #52718 from foxyriver/ingress

Automatic merge from submit-queue (batch tested with PRs 51902, 52718, 52687, 52137, 52697). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>..

stop the Timer

**What this PR does / why we need it**:

Ticker stop twice, and does not stop Timer.
pull/6/head
Kubernetes Submit Queue 2017-09-23 19:49:49 -07:00 committed by GitHub
commit ac91b19cfc
1 changed files with 2 additions and 2 deletions

View File

@ -430,7 +430,7 @@ func (c *sioClient) WaitForAttachedDevice(token string) (string, error) {
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
timer := time.NewTimer(30 * time.Second)
defer ticker.Stop()
defer timer.Stop()
for {
select {
@ -464,7 +464,7 @@ func (c *sioClient) WaitForDetachedDevice(token string) error {
ticker := time.NewTicker(time.Second)
defer ticker.Stop()
timer := time.NewTimer(30 * time.Second)
defer ticker.Stop()
defer timer.Stop()
for {
select {