Closed mceaglens closed 7 years ago
Any comments?
Sorry for the late response and thanks for your contribution. Would it be possible for you to add a test for it?
I don't see an obvious way to test the internal content of the map (the commit solves a memory leak in the case we do a lot of sub,unsub on the same subject from different pids). Would it be enough to just make sure that repeated sub, unsub,sub, unsub still works, that is we have not destroyed the use case where we earlier reused the same key in the maps?
OK, merging this. Thank you for your contribution.
Hi again,
Added some clean-up of the subscription maps to avoid them to grow for ever. I had problem how to handle if max_messages was used in unsub, but we do not use that so I appreciate if this also could be merged. Maybe you have ideas for max_messages?
Also added a disconnect test for my earlier commit.