valotrading/silvertip — pull request #36 by jvirtanen (2013-01-22 13:34:34+00:00)
Title: Fix race condition in 'dispatchMessages'

`SelectionKey#isValid` returns false if a selection key is cancelled, but if the selection key is cancelled, `SelectionKey#isAcceptable`, for example, throws a `CancelledKeyException`. Fix the method so that exceptions are properly handled.