Skip to content

Commit

Permalink
add 10 retry GPIO export polling
Browse files Browse the repository at this point in the history
  • Loading branch information
kou029w committed Oct 6, 2024
1 parent 4b12d33 commit 3a5ae2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3a5ae2b

Please sign in to comment.