From 5729ae9f3aa677c58fe5213095b9a8141cb7d202 Mon Sep 17 00:00:00 2001 From: Alexander Pevzner Date: Sun, 23 May 2021 13:13:34 +0300 Subject: [PATCH] DNSSdRetryInterval was erroneously used instead of DevInitRetryInterval (#31) --- pnp.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pnp.go b/pnp.go index d2a5f96..adc3b33 100644 --- a/pnp.go +++ b/pnp.go @@ -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 @@ -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, @@ -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 }