Skip to content

Commit 796a0c4

Browse files
xiexin36artembilan
authored andcommitted
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**
1 parent 400f9e1 commit 796a0c4

File tree

1 file changed

+1
-1
lines changed
  • spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection

1 file changed

+1
-1
lines changed

spring-integration-ip/src/main/java/org/springframework/integration/ip/tcp/connection/TcpNioConnection.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ public void close() throws IOException {
765765
super.close();
766766
this.isClosed = true;
767767
try {
768-
this.buffers.offer(EOF, TcpNioConnection.this.pipeTimeout, TimeUnit.SECONDS);
768+
this.buffers.offer(EOF, TcpNioConnection.this.pipeTimeout, TimeUnit.MILLISECONDS);
769769
}
770770
catch (@SuppressWarnings(UNUSED) InterruptedException e) {
771771
Thread.currentThread().interrupt();

0 commit comments

Comments
 (0)