Skip to content

Commit

Permalink
DNSSdRetryInterval was erroneously used instead of DevInitRetryInterv…
Browse files Browse the repository at this point in the history
…al (#31)
  • Loading branch information
alexpevzner committed May 23, 2021
1 parent f6a71b4 commit 5729ae9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pnp.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const (

// pnpRetryTime returns time of next retry of failed device initialization
func pnpRetryTime() time.Time {
return time.Now().Add(DNSSdRetryInterval)
return time.Now().Add(DevInitRetryInterval)
}

// pnpRetryExpired checks if device initialization retry time expired
Expand All @@ -44,7 +44,7 @@ func PnPStart(exitWhenIdle bool) PnPExitReason {
devByAddr := make(map[UsbAddr]*Device)
retryByAddr := make(map[UsbAddr]time.Time)
sigChan := make(chan os.Signal, 1)
ticker := time.NewTicker(DNSSdRetryInterval / 4)
ticker := time.NewTicker(DevInitRetryInterval / 4)
tickerRunning := true

signal.Notify(sigChan,
Expand Down Expand Up @@ -120,7 +120,7 @@ loop:
ticker.Stop()
tickerRunning = false
case !tickerRunning && len(retryByAddr) != 0:
ticker = time.NewTicker(DNSSdRetryInterval / 4)
ticker = time.NewTicker(DevInitRetryInterval / 4)
tickerRunning = true
}

Expand Down

0 comments on commit 5729ae9

Please sign in to comment.