You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From my discussion with Robert, the issue manifests itself like so:
Have a keepalive socket as an http_client to some server.
Server sends a FIN ACK as it decides the connection has been idle for too long which puts the socket into CLOSE_WAIT
something comes along and makes a new request with the http_client instance, headers are sent on the socket which is in CLOSE_WAIT so they are still received.
Since the server can't actually respond, the connection gets an RST from the server end and cpprestsdk finds out about it when it moves onto trying to write the body, consequently throwing an exception to the user.
Firstly, we should try other connections if we end up in this state, however, retrying all connections will result in one unlucky caller spending time acting as a garbage collector for all the dead sockets, which could be numerous.
One option for dealing with this is to retry the pool of existing connections in a limited fashion such that anyone who encounters 2 failures will give up and (try to) establish a new connection - so they'll still have cleaned up more than they created.