This repository has been archived by the owner on Apr 21, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shutdown-and-flushing: Improve shutdown, support/test FlushHtml
- Improve shutting down both gracefully and quickly - Set the flush flags on buffers when FlushHtml is on for optimized html responses - Add tests for these features - Don't call proxy_fetch->Flush() each time our body filter is called, because that would only make sense if we'd also set buf->flush. Needs a support call in PSOL to work to cancel outstanding proxyfetches: ```diff Index: proxy_fetch.cc =================================================================== --- proxy_fetch.cc (revision 4597) +++ proxy_fetch.cc (working copy) @@ -90,6 +90,19 @@ << " outstanding requests."; } + +void ProxyFetchFactory::CancelOutstanding() { + ScopedMutex lock(outstanding_proxy_fetches_mutex_.get()); + + for (std::set<ProxyFetch*>::iterator i = outstanding_proxy_fetches_.begin(); i != outstanding_proxy_fetches_.end(); i++) { + ProxyFetch* proxy_fetch = *i; + proxy_fetch->Done(false); + } + + outstanding_proxy_fetches_.clear(); +} + + ProxyFetch* ProxyFetchFactory::CreateNewProxyFetch( const GoogleString& url_in, AsyncFetch* async_fetch, RewriteDriver* driver, Index: proxy_fetch.h =================================================================== --- proxy_fetch.h (revision 4597) +++ proxy_fetch.h (working copy) @@ -64,6 +64,7 @@ explicit ProxyFetchFactory(ServerContext* server_context); ~ProxyFetchFactory(); + void CancelOutstanding(); // Convenience method that calls CreateNewProxyFetch and then StartFetch() on // the resulting fetch. void StartNewProxyFetch( ```
- Loading branch information
Showing
7 changed files
with
297 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.