jengle wrote:Ran into a rather nasty problem recently after switching over from HTTP to HTTPS. The application I'm working on tries to re-use connections as much as possible, we set up keep-alive to allow for an unlimited number of requests and set a timeout of 6 seconds on the server. The client-side is similar, but sets the timeout to 5 seconds. Since most of our traffic is rather "burst-y", this has worked out pretty well, with most scenarios being satisfied with one or two connections at most. The issue I'm seeing now is when we re-use a HTTPSClientSession after it has been idle for a while (I haven't narrowed it down exactly, but significantly longer than the 6 seconds for the server-side to wind-down the connection. When it hits HTTPClientSession::sendRequest, the check for connect/reconnect on line 199 hits true, close is called, and that's when the problems hit. In SecureSocketImpl::close, the call to shutdown() is unguarded by a try/catch, and a failure of POCO_ECONNABORTED is thrown. I might have a usage error here, but at the same time, it seems like SecureSocketImpl::close should be exception-safe.
Users browsing this forum: sachinp and 1 guest