Description
As reported by Kristoffer Gronowski:
We just found a nasty scenario where we are running on GF with Grizzly connector. (Default for GF v2 and v3)
Default time for time out is 30 sec so after 30 sec you can see that GF is sending a FIN and the Restlet http client is sending an ACK.
This is OK according to TCP server closed his side for sending but the client has still the socket up and can send.
Now what happens is that the connection is reused and we manage to send a HTTP POST that the server will receive.
Only problem is that when it is trying to send a response it can not do it and has to send a RST back on TCP.
The entire transaction results in a 1000 response on the client side. The point here is that I think the client before using the socket should check if the server did shutdown its stream.
If I am not wrong Socket.isInputShutdown() should return true in this case where before sending the client should open a new socket.
(There is no reason for a HTTP client to send in only one direction, maybe if upgraded to a web socket but it feels like asking for trouble...)
Have you got this one already reported?
The fix should be quite simple and I know that 30 sec is quite trigger happy (But there is no point in upsetting J-F and asking why the time is so short).