new DefaultWriteRequest(message, future, remoteAddress));
if (openedFileChannel != null) {
// If we opened a FileChannel, it needs to be closed when the write has completed
final FileChannel finalChannel = openedFileChannel;
future.addListener(new IoFutureListener<WriteFuture>() {
public void operationComplete(WriteFuture future) {
try {
finalChannel.close();
} catch (IOException e) {
ExceptionMonitor.getInstance().exceptionCaught(e);