poco
poco copied to clipboard
HTTPClientSession::receiveResponse() not timing out on Windows
I have the same code compiled on Windows and macOS:
Poco::Net::HTTPClientSession session( "localhost", 9894 );
session.setTimeout( Poco::Timespan( 0, 100 ) );
...
std::ostream& reqOs = session.sendRequest( req );
...
Poco::Net::HTTPResponse res;
std::istream& resIs = session.receiveResponse( res );
(localhost:9894
waits for 10 seconds in it's HTTPRequestHandler
before returning)
On macOS receiveResponse()
throws TimeoutException
after 100ms as expected, but on Windows it will block for the full 10s and return the stream happily.
Hmmm, so it appears that, if I set the timeout to 1s or more, it works.
I also observed a timeout issues (with SSL connections) on Windows, see #3806 - it could be that these are related
Please state the library and OS versions that your are using and whether you use plain HTTP, HTTPS with NetSSL_Win, or HTTPS with NetSSL_OpenSSL.
I experienced this on Windows 11, using POCO 1.11.3 with plain HTTP.
This issue is stale because it has been open for 365 days with no activity.
This issue was closed because it has been inactive for 60 days since being marked as stale.