Skip to content

Commit

Permalink
fix(bluetooth-classic): increased the timeout
Browse files Browse the repository at this point in the history
A higher timeout ensures that the component doesn't change to not_home
incorrectly occasionally
  • Loading branch information
mKeRix committed Jan 27, 2020
1 parent 58f79ab commit b18b812
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -199,7 +199,7 @@ describe('BluetoothClassicService', () => {
'test-instance',
10
);
expect(sensorInstance.timeout).toBe(35);
expect(sensorInstance.timeout).toBe(40);
});

it('should not distribute inquiries if not the leader', () => {
Expand Down
Expand Up @@ -253,7 +253,7 @@ export class BluetoothClassicService extends KalmanFilterable(Object, 1.4, 1)
protected calculateCurrentTimeout(): number {
const nodes = this.getParticipatingNodes();
const addresses = Object.values(this.config.addresses); // workaround for node-config deserializing to an Array-like object
return (Math.max(nodes.length, addresses.length) + 1.5) * 10;
return Math.max(nodes.length, addresses.length) * 2 * 10;
}

/**
Expand Down

0 comments on commit b18b812

Please sign in to comment.