If two calls to ChannelDispatcher.EnsureChannel are made, both satisfied by the same channel, the handler would ideally receive a single HandleChannels() call listing those two channel requests rather than two calls. This depends on the CM responding as follows to the two EnsureChannel calls: CD -> CM EnsureChannel[1] CD -> CM EnsureChannel[2] CD <- CM 1 returns CD <- CM 2 returns <- CM -> NewChannels Under the current implementation, this *should* work when the CM returns from EnsureChannel asynchronously, but this should be verified; when it returns synchronously, it cannot work because call 2 does not arrive at the CM until after it's emitted NewChannels, so the CD must call HandleChannels twice. Perhaps TpChannelManager should emit NewChannels in an idle callback to give the second EnsureChannel call a chance to arrive and be processed?
Do you have a use case where this bug actually matters?
Not really. It just means the channel dispatcher has code for a situation which rarely happens, and handlers had better get used to getting multiple HandleChannels calls.
Alban's right. This isn't a bug.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.