Bugfix: ConnectionImpl::reportError calls ChannelImpl::reportError of every channel. The channel then removes itselfs from the connection. That caused the for loop to run out of bounds. Fixed by switching to while

This commit is contained in:
Sebastian Melinat 2015-01-28 11:47:03 +01:00
parent f23dc72a4f
commit 09850e792f
1 changed files with 3 additions and 3 deletions

View File

@ -308,11 +308,11 @@ public:
Monitor monitor(this);
// all deferred result objects in the channels should report this error too
for (auto &iter : _channels)
while (!_channels.empty())
{
// report the errors
iter.second->reportError(message, false);
_channels.begin()->second->reportError(message, false);
// leap out if no longer valid
if (!monitor.valid()) return;
}