Skip to content

Commit 5a1539b

Browse files
Merge pull request CopernicaMarketingSoftware#20 from keenlogics/develop
Bugfix: ConnectionImpl::reportError for loops runs out of bounds
2 parents f23dc72 + 09850e7 commit 5a1539b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/connectionimpl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,11 +308,11 @@ class ConnectionImpl : public Watchable
308308
Monitor monitor(this);
309309

310310
// all deferred result objects in the channels should report this error too
311-
for (auto &iter : _channels)
311+
while (!_channels.empty())
312312
{
313313
// report the errors
314-
iter.second->reportError(message, false);
315-
314+
_channels.begin()->second->reportError(message, false);
315+
316316
// leap out if no longer valid
317317
if (!monitor.valid()) return;
318318
}

0 commit comments

Comments
 (0)