novoda / merlin

Observes network connection status & gives callbacks
Other
543 stars 79 forks source link

MER-168 concurrent modification exception #183

Closed niltsiar closed 5 years ago

niltsiar commented 5 years ago

Problem

Addresses #168

Under some circumstances it seems to be possible to modify the Registerable list of a Register while it's been iterated and this produces an Exception

Solution

The solution returns a copy of the registerables list to be iterated so no exception is produced if the underlying list is modified.

Test(s) added

Yes. A test has been added in order to find the bug and see that the solution fixes it.

Paired with

Nobody

hal9002 commented 5 years ago

Can one of the admins review this PR?

Mecharyry commented 5 years ago

ok to test