You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2018/08/27 15:06:34 UTC
[trafficserver] branch master updated: Fix crash in
Http2ClientSession::release_netvc
This is an automated email from the ASF dual-hosted git repository.
shinrich 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 507368d Fix crash in Http2ClientSession::release_netvc
507368d is described below
commit 507368d035bce23d35832fb3c9dbae9158ba452d
Author: Susan Hinrichs <sh...@oath.com>
AuthorDate: Wed Aug 22 14:01:43 2018 +0000
Fix crash in Http2ClientSession::release_netvc
---
proxy/ProxyClientSession.cc | 1 -
proxy/ProxyClientSession.h | 1 -
proxy/http/Http1ClientSession.h | 13 -------------
proxy/http2/Http2ClientSession.cc | 2 --
proxy/http2/Http2ClientSession.h | 11 -----------
5 files changed, 28 deletions(-)
diff --git a/proxy/ProxyClientSession.cc b/proxy/ProxyClientSession.cc
index 2f80f3b..64293cc 100644
--- a/proxy/ProxyClientSession.cc
+++ b/proxy/ProxyClientSession.cc
@@ -200,7 +200,6 @@ ProxyClientSession::handle_api_return(int event)
NetVConnection *vc = this->get_netvc();
if (vc) {
vc->do_io_close();
- this->release_netvc();
}
free(); // You can now clean things up
break;
diff --git a/proxy/ProxyClientSession.h b/proxy/ProxyClientSession.h
index e08162c..2e3d36f 100644
--- a/proxy/ProxyClientSession.h
+++ b/proxy/ProxyClientSession.h
@@ -81,7 +81,6 @@ public:
virtual void new_connection(NetVConnection *new_vc, MIOBuffer *iobuf, IOBufferReader *reader, bool backdoor) = 0;
virtual NetVConnection *get_netvc() const = 0;
- virtual void release_netvc() = 0;
virtual int get_transact_count() const = 0;
diff --git a/proxy/http/Http1ClientSession.h b/proxy/http/Http1ClientSession.h
index 6591202..decdc9f 100644
--- a/proxy/http/Http1ClientSession.h
+++ b/proxy/http/Http1ClientSession.h
@@ -100,19 +100,6 @@ public:
return client_vc;
}
- void
- release_netvc() override
- {
- // Make sure the vio's are also released to avoid
- // later surprises in inactivity timeout
- if (client_vc) {
- client_vc->do_io_read(nullptr, 0, nullptr);
- client_vc->do_io_write(nullptr, 0, nullptr);
- client_vc->set_action(nullptr);
- client_vc = nullptr;
- }
- }
-
int
get_transact_count() const override
{
diff --git a/proxy/http2/Http2ClientSession.cc b/proxy/http2/Http2ClientSession.cc
index 01d2ed7..27648f6 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -79,7 +79,6 @@ Http2ClientSession::free()
}
if (client_vc) {
- release_netvc();
client_vc->do_io_close();
client_vc = nullptr;
}
@@ -274,7 +273,6 @@ Http2ClientSession::do_io_close(int alerrno)
// Copy aside the client address before releasing the vc
cached_client_addr.assign(client_vc->get_remote_addr());
cached_local_addr.assign(client_vc->get_local_addr());
- this->release_netvc();
client_vc->do_io_close();
client_vc = nullptr;
}
diff --git a/proxy/http2/Http2ClientSession.h b/proxy/http2/Http2ClientSession.h
index 4f69dc9..5ecfc6c 100644
--- a/proxy/http2/Http2ClientSession.h
+++ b/proxy/http2/Http2ClientSession.h
@@ -186,17 +186,6 @@ public:
return client_vc;
}
- void
- release_netvc() override
- {
- // Make sure the vio's are also released to avoid later surprises in inactivity timeout
- if (client_vc) {
- client_vc->do_io_read(nullptr, 0, nullptr);
- client_vc->do_io_write(nullptr, 0, nullptr);
- client_vc->set_action(nullptr);
- }
- }
-
sockaddr const *
get_client_addr() override
{