Skip to content

Commit 8a4e733

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 756cd41 commit 8a4e733

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ public void close() throws IOException {
761761
super.close();
762762
this.isClosed = true;
763763
try {
764-
this.buffers.offer(EOF, TcpNioConnection.this.pipeTimeout, TimeUnit.SECONDS);
764+
this.buffers.offer(EOF, TcpNioConnection.this.pipeTimeout, TimeUnit.MILLISECONDS);
765765
}
766766
catch (InterruptedException e) {
767767
Thread.currentThread().interrupt();

0 commit comments

Comments
 (0)