vongosling This fixes the problem that happens when you restart the broker controller by closing the channel (anyway, if there's no special reason it's good to close it). But you cannot write the test for it because AcceptSocketService#beginAccept() swallows the exception.
The solution is to make AcceptSocketService#beginAccept() propagate the exception up, so we can catch it, and this will make writing the test possible. AcceptSocketService#beginAccept() can potentially throw many kinds of exceptions, let's not swallow them. I added the modifications and BrokerControllerTest#testRestart(). Please have a look.
Actually, even without adding this test, enabling exception propagation fails all tests for the broker controller, which shows again that swallowing the exceptions were just hiding them