mono/mono — pull request #1225 by strawd (2014-08-22 17:54:40+00:00)
Title: Fix for bug 22307 - Intermittent IndexOutOfRangeException on closing connection

This fixes Xamarin bug 22307 (https://bugzilla.xamarin.com/show_bug.cgi?id=22307). When adding/removing channels in other areas of this class a lock is taken on the 'channels' variable. In one case the lock was missed, and this caused intermittent failures when removing a channel.