Skip to content

Commit

Permalink
Add retry to fix permission error in listen(). Fixes JamesBarwell#111
Browse files Browse the repository at this point in the history
  • Loading branch information
smagoun committed Nov 29, 2020
1 parent 22754a4 commit 1a56b0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rpi-gpio.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ function Gpio() {
}, RETRY_OPTS);
})
.then(function() {
listen(channel, onListen);
return retry(function() {
return listen(channel, onListen);
}, RETRY_OPTS);
})
.then(function() {
onSetup();
Expand Down

0 comments on commit 1a56b0f

Please sign in to comment.