JoelBender / bacpypes

BACpypes provides a BACnet application layer and network layer written in Python for daemons, scripting, and graphical interfaces.
MIT License
296 stars 129 forks source link

Device Info Cache Reference #142

Closed JoelBender closed 6 years ago

JoelBender commented 6 years ago

Each ClientSSM and ServerSSM instance gets a DeviceInfo instance from the cache when it starts its work and releases it when it's done. The problem is when there is more than one active SSM there could be more than one reference to the same instance and when one SSM calls release_device_info() the cache entry was removed, the second SSM call failed.

JoelBender commented 6 years ago

Check out the 142-device-info-cache branch for a patch and additional sample applications.

kmonson commented 6 years ago

@JoelBender This fixes our problem with concurrent requests to the same device in the VOLTTRON BACnet Proxy.

JoelBender commented 6 years ago

Good! Thank you.