jgaalen opened a new issue, #6330: URL: https://github.com/apache/jmeter/issues/6330
### Expected behavior If the server closes an HTTP connection, jmeter should handle the closed connection immediately and not keeping it in CLOSE_WAIT state until the next request ### Actual behavior Currently, when JMeter does an HTTP request and is in keep-alive state and server waits for the next request. If the server closes the connection after X-seconds and sends a FIN/ACK packet, JMeter does nothing. If the next request is done within 5 seconds after the FIN/ACK packet, it sets a "Non HTTP response message: <HOST>:<PORT> failed to respond" error immediately, because the server is already in CLOSED state and can't pick up new packets. This results in this error. If it tries to send a request later than 5 seconds, somehow it gracefully sends a FIN/ACK back and creates a new connection and does the request. ### Steps to reproduce the problem Set keep-alive timeout to 2 seconds on the server, so it shuts down the connection after 2 seconds. Then create a jmeter script to send request 1, then wait 3 seconds, then send request 2. It will end up with the Non HTTP response error, because it tries to send the request on a closed socket. Now wait 6 seconds rather than 3, and somehow it does work without an error. ### JMeter Version 5.6.3 ### Java Version 17 ### OS Version Mac + Ubuntu -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org