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 756cd41085
commit 8a4e73309c

View File

@@ -761,7 +761,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 (InterruptedException e) {
Thread.currentThread().interrupt();