mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
Fix name/log var corruption
This commit is contained in:
7
app.js
7
app.js
@@ -100,7 +100,8 @@ function loadPlatforms() {
|
||||
|
||||
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++;
|
||||
platformInstance.accessories(function(foundAccessories){
|
||||
asyncCalls--;
|
||||
@@ -129,6 +130,10 @@ function loadPlatforms() {
|
||||
publish();
|
||||
})
|
||||
}
|
||||
|
||||
// query for devices
|
||||
getAccessories(name, log);
|
||||
}
|
||||
}
|
||||
|
||||
function publish() {
|
||||
|
||||
Reference in New Issue
Block a user