homebridge-isy-js icon indicating copy to clipboard operation
homebridge-isy-js copied to clipboard

This callback function has already been called by someone else; it can only be called one time

Open Valdhor opened this issue 7 years ago • 0 comments

In /usr/local/lib/node_modules/homebridge-isy-js/index.js there appears to be a bug with the callback at the end of function:

ISYPlatform.prototype.accessories = function(callback)

I changed the following:

callback(results);

to:

if(callbackCount == 0) { callback(results); callbackCount++; }

As well as adding the following line to the beginning of the function:

var callbackCount = 0;

Which appears to make it work (At least on FreeBSD11)

Valdhor avatar Nov 29 '17 17:11 Valdhor