From 3a5ae2bfbacca2a6ae3c96a4dd5e80003992003a Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Sun, 6 Oct 2024 15:23:14 +0900 Subject: [PATCH] add 10 retry GPIO export polling --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 697b000..d0c3a73 100644 --- a/index.ts +++ b/index.ts @@ -253,7 +253,7 @@ export class GPIOPort extends EventEmitter { } // biome-ignore lint/suspicious/noExplicitAny: } catch (error: any) { - if (this._exportRetry === 0) { + if (this._exportRetry < 10) { await sleep(100); console.warn('May be the first time port access. Retry..'); ++this._exportRetry;