This commit is contained in:
@@ -147,10 +147,14 @@ public class TcpAioAsyncConnection extends AsyncConnection {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.writetime = System.currentTimeMillis();
|
this.writetime = System.currentTimeMillis();
|
||||||
if (writeTimeoutSeconds > 0) {
|
try {
|
||||||
channel.write(src, writeTimeoutSeconds, TimeUnit.SECONDS, attachment, newHandler);
|
if (writeTimeoutSeconds > 0) {
|
||||||
} else {
|
channel.write(src, writeTimeoutSeconds, TimeUnit.SECONDS, attachment, newHandler);
|
||||||
channel.write(src, attachment, newHandler);
|
} else {
|
||||||
|
channel.write(src, attachment, newHandler);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
newHandler.failed(e, attachment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,7 +181,11 @@ public class TcpAioAsyncConnection extends AsyncConnection {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.writetime = System.currentTimeMillis();
|
this.writetime = System.currentTimeMillis();
|
||||||
channel.write(srcs, offset, length, writeTimeoutSeconds > 0 ? writeTimeoutSeconds : 60, TimeUnit.SECONDS, attachment, newHandler);
|
try {
|
||||||
|
channel.write(srcs, offset, length, writeTimeoutSeconds > 0 ? writeTimeoutSeconds : 60, TimeUnit.SECONDS, attachment, newHandler);
|
||||||
|
} catch (Exception e) {
|
||||||
|
newHandler.failed(e, attachment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user