Trying to fix #476, I realised the session reference itself was dropped by the refcount which means the query has no way of knowing if the session is still valid.
A possible solution is to introduce weak references. The query having a session weak references, it would be able to check the session validity before the whole rc container is dropped.
Bonus: Working on this, I realized the z_clone was not working properly and there was a consolidation mode edge case when receiving replies.
Trying to fix #476, I realised the session reference itself was dropped by the refcount which means the query has no way of knowing if the session is still valid.
A possible solution is to introduce weak references. The query having a session weak references, it would be able to check the session validity before the whole rc container is dropped.
Bonus: Working on this, I realized the
z_clone
was not working properly and there was a consolidation mode edge case when receiving replies.