We are using JDK11 java.net.http HTTP client to get data from an API. After we receive the response the connections remain opened in our server with TCP state CLOSE_WAIT, which means the client must close the connection.
From RFC 793 terminology:
CLOSE-WAIT - represents waiting for a connection termination request from the local user.
This is our client code which runs on WildFly 16 running on Java 12 as a stateless REST API. We don't understand why this is …