Compare commits

...

2 commits

Author SHA1 Message Date
bot
fc8f140337 1.1.2 2024-10-06 06:24:00 +00:00
3a5ae2bfba
add 10 retry GPIO export polling 2024-10-06 15:23:40 +09:00
2 changed files with 2 additions and 2 deletions

View file

@ -253,7 +253,7 @@ export class GPIOPort extends EventEmitter {
} }
// biome-ignore lint/suspicious/noExplicitAny: // biome-ignore lint/suspicious/noExplicitAny:
} catch (error: any) { } catch (error: any) {
if (this._exportRetry === 0) { if (this._exportRetry < 10) {
await sleep(100); await sleep(100);
console.warn('May be the first time port access. Retry..'); console.warn('May be the first time port access. Retry..');
++this._exportRetry; ++this._exportRetry;

View file

@ -1,6 +1,6 @@
{ {
"name": "node-web-gpio", "name": "node-web-gpio",
"version": "1.1.1", "version": "1.1.2",
"description": "GPIO access with Node.js", "description": "GPIO access with Node.js",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",