Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java 11 Connection reset issue when socket.close() called

Banti DuttaJun 3 2025

Question is related to socket programming
While migrating socket based application from Java 8 to Java 11 facing connection reset error on client end

Steps:
- Socket connection is accepted in our application from browser client.
- Socket starts to read using socket's inputsteam.read(this.data, offset, remaining). This is happening in one thread. If data is not available still thread will be on the read block.
- Socket close can be called from another thread.

Observations:

  • Java 8 the client gets FIN.
  • Java 11 the client gets RST.

Any idea why this behavior?

Comments
Post Details
Added on Jun 3 2025
1 comment
155 views