HTTPClientSession KeepAlive and setMaxKeepAliveRequests #4507
micheleselea
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In HTTPClientSession::write there's a code to try "reconnect and resend" if a connection is keepalive and we got an Exception
That is nice, but same behavior happens, often (I think always) in HTTPClientSession::receiveResponse with ssl connesions
Consider for example this environment
HTTPClientSession -> HTTPServer
we configure HTTPServer with setMaxKeepAliveRequests(10)
An HTTPClientSession will connect make 10 requests without problem, than the HTTPClientSession server side is closed.
The 11th HTTPClientSession request will do a HTTPClientSession::write without problem but obviously the receiveResponse will fail with Poco::Net::ConnectionAbortedException or Poco::Net::NoMessageException and your request is lost.
I think it's more complicated to deal with that error as for the ::write function, probably we should automatically "reconnect write and receive" but I understand it's not simple as in write
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions