Call async_fetch_->Done after all usages.

AsyncFetch::Done will delete itself. Accessing
async_fetch_->extra_respond_headers() will crash nginx.
This commit is contained in:
Vasily Chekalkin
2015-02-17 12:18:30 +01:00
committed by Otto van der Schaaf
parent 1ea7e3e568
commit d1f2a43a71
+1 -4
View File
@@ -464,9 +464,6 @@ void NgxFetch::CallbackDone(bool success) {
connection_ = NULL;
}
// TODO(oschaaf): see https://github.com/pagespeed/ngx_pagespeed/pull/755
async_fetch_->Done(success);
if (fetcher_ != NULL) {
if (fetcher_->track_original_content_length()
&& async_fetch_->response_headers()->Has(
@@ -476,7 +473,7 @@ void NgxFetch::CallbackDone(bool success) {
}
fetcher_->FetchComplete(this);
}
async_fetch_->Done(success);
async_fetch_ = NULL;
}