Refactored event sending function to be more robust and thread safe

This commit is contained in:
Ziver Koc 2021-08-30 01:42:34 +02:00
parent 102d8aa266
commit f5f3730281
4 changed files with 6 additions and 9 deletions

View file

@ -75,8 +75,7 @@ public class OnOffTrait extends DeviceTrait {
else
eventData.turnOff();
device.setDeviceData(eventData);
EventControllerManager.getInstance().send((Event) device);
EventControllerManager.getInstance().send((Event) device, eventData);
}
}
}