add 10 retry GPIO export polling

This commit is contained in:
Nebel 2024-10-06 15:23:14 +09:00
parent 4b12d332ff
commit 3a5ae2bfba
Signed by: nebel
GPG key ID: 79807D08C6EF6460

View file

@ -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;