You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2017/05/05 17:26:21 UTC
[trafficserver] branch master updated: Fix double do_io_close in
HttpTunnel::chain_abort_all()
This is an automated email from the ASF dual-hosted git repository.
zwoop pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 14df7b6 Fix double do_io_close in HttpTunnel::chain_abort_all()
14df7b6 is described below
commit 14df7b647873fa0d95aa24f4b94da5014afc7002
Author: Oknet Xu <xu...@skyguard.com.cn>
AuthorDate: Fri May 5 16:42:42 2017 +0800
Fix double do_io_close in HttpTunnel::chain_abort_all()
A state machine can not access the VConnectuion or any returned
VIOs after calling do_io_close().
The TVC maybe already destroyed while the 2nd close on TransformVC,
this bug may cause TransformVC crash.
---
proxy/http/HttpTunnel.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
index eb4b1dd..a3479b4 100644
--- a/proxy/http/HttpTunnel.cc
+++ b/proxy/http/HttpTunnel.cc
@@ -1480,12 +1480,12 @@ HttpTunnel::chain_abort_all(HttpTunnelProducer *p)
if (p->read_vio) {
p->bytes_read = p->read_vio->ndone;
}
- if (p->self_consumer) {
+ p->read_vio = nullptr;
+ if (p->self_consumer && p->self_consumer->alive) {
p->self_consumer->alive = false;
+ p->vc->do_io_close(EHTTP_ERROR);
+ update_stats_after_abort(p->vc_type);
}
- p->read_vio = nullptr;
- p->vc->do_io_close(EHTTP_ERROR);
- update_stats_after_abort(p->vc_type);
}
}
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].