Checking for NIO cannot be done in `onInit()` because the factory is not yet started. **cherry-pick to 5.3.x**