[FIXED JENKINS-24050] also catch CancelledKeyException just in case.