mirror of
https://github.com/mtan93/homebridge.git
synced 2026-05-11 14:26:05 +01:00
Fix name/log var corruption
This commit is contained in:
@@ -100,7 +100,8 @@ function loadPlatforms() {
|
|||||||
|
|
||||||
var platformInstance = new platformConstructor(log, platformConfig);
|
var platformInstance = new platformConstructor(log, platformConfig);
|
||||||
|
|
||||||
// query for devices
|
// wrap name and log in a closure so they don't change in the callback
|
||||||
|
function getAccessories(name, log) {
|
||||||
asyncCalls++;
|
asyncCalls++;
|
||||||
platformInstance.accessories(function(foundAccessories){
|
platformInstance.accessories(function(foundAccessories){
|
||||||
asyncCalls--;
|
asyncCalls--;
|
||||||
@@ -129,6 +130,10 @@ function loadPlatforms() {
|
|||||||
publish();
|
publish();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// query for devices
|
||||||
|
getAccessories(name, log);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function publish() {
|
function publish() {
|
||||||
|
|||||||
Reference in New Issue
Block a user