Skip to content
This repository has been archived by the owner on Jul 5, 2019. It is now read-only.

Commit

Permalink
Added timeout for liqScan and taking data from catch when request not…
Browse files Browse the repository at this point in the history
… success.
  • Loading branch information
kirovilya committed Aug 8, 2018
1 parent 8621b18 commit a756ed5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/shepherd.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,12 @@ ZShepherd.prototype.lqiScan = function (ieeeAddr) {
}

return self.lqi(ieeeAddr)
.timeout(1000)
.then(processResponse(ieeeAddr))
.then(function(chain){
.then(function(){
return Object.values(noDuplicate);
})
.catch(function(){
return Object.values(noDuplicate);
});
};
Expand Down

0 comments on commit a756ed5

Please sign in to comment.