[#943] Fix CanceledKeyException which can happen on frequently deregister/register while using the NIO Transport