Simplify the logic for updating OP_WRITE in the NIO transport

- Removed code duplication
Remove an unnecessary empty line