Fix TimeUnit in ChannelInputStream.close()

The `TcpNioConnection.ChannelInputStream.close()` uses wrongly `TimeUnit.SECONDS`
for the `pipeTimeout` in the `this.buffers.offer()` call.

* The `TimeUnit.MILLISECONDS` must be used instead

**Cherry-pick to 5.1.x, 5.0.x, 4.3.x**
This commit is contained in:
谢鑫
2019-05-28 14:34:44 -04:00
committed by Artem Bilan
parent 400f9e1026
commit 796a0c43d2

View File

@@ -765,7 +765,7 @@ public class TcpNioConnection extends TcpConnectionSupport {
super.close();
this.isClosed = true;
try {
this.buffers.offer(EOF, TcpNioConnection.this.pipeTimeout, TimeUnit.SECONDS);
this.buffers.offer(EOF, TcpNioConnection.this.pipeTimeout, TimeUnit.MILLISECONDS);
}
catch (@SuppressWarnings(UNUSED) InterruptedException e) {
Thread.currentThread().interrupt();