Unsubscribe in push_event leads to API_EventTimeout

We encountered this issue when investigating https://github.com/tango-controls/pytango/issues/292.

The architecture is as following. We have one DS called DeviceServer which exports in total two devices, each of a different class. These two classes are:

  • Device1 with one attribute attr1
  • Device2 with two attributes attr1 and attr2

What we will do:

  1. Subscribe to attr1 configuration events of the Device1 device.
  2. Subscribe to attr1 change events of the Device2 device.
  3. Subscribe to attr2 change events of the Device2 device with a callback which will unsubscribe from the previously subscribed attr1 configuration events of the Device1 device.

This leads to the situation where the client stops receiving events and just get's API_EventTimeout.

Thanks to the example provided by @schooft we could also reproduce it with C++ client.

More details and the exemplary code can be found in https://github.com/reszelaz/test-tango-unsub.