pocoproject / poco

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
https://pocoproject.org
Other
8.07k stars 2.11k forks source link

HTTPClientSession and DEFAULT_KEEP_ALIVE_TIMEOUT #4457

Open micheleselea opened 5 months ago

micheleselea commented 5 months ago

In HTTPClientSession, when in keepalive, we use the default 8 seconds DEFAULT_KEEP_ALIVE_TIMEOUT to check with _lastRequest and control if the connection has to reconnect. The _lastRequest is updated on sendRequestImpl() I was thinking that probably we should update _lastRequest even after response received, otherwise if a response last 8 seconds you will always end up with a reconnection make the keep alive setting useless: it's just something I asking myself, what do you think about?