SINTEF-9012/bglib — pull request #11 by rasendubi (2014-08-29 11:31:17+00:00)
Title: Synchronize listeners

Currently listeners list is not synchronized. That means that removing
listener in receive handler causes ConcurrentModificationException to be
thrown.

This patch wraps listeners list with Collections.synchronizedList() and
synchronizes all iteration on it with synchronize(listeners) as
synchornized list requires.

After that it's Ok to unsubscribe from events in receive handlers.