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 9a7742a Fix so EOS are delivered to sessions in the pool (#7828)
9a7742a is described below
commit 9a7742a3a59adfacb068b49d315b5f81c2c7944f
Author: Susan Hinrichs <[email protected]>
AuthorDate: Fri May 14 08:58:59 2021 -0500
Fix so EOS are delivered to sessions in the pool (#7828)
---
proxy/PoolableSession.h | 2 ++
proxy/http/Http1ClientSession.cc | 2 +-
proxy/http/Http1ServerSession.h | 2 +-
proxy/http/HttpSessionManager.cc | 4 +++-
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/proxy/PoolableSession.h b/proxy/PoolableSession.h
index 76946ef..802ddb3 100644
--- a/proxy/PoolableSession.h
+++ b/proxy/PoolableSession.h
@@ -83,6 +83,8 @@ public:
void set_netvc(NetVConnection *newvc);
+ virtual IOBufferReader *get_reader() = 0;
+
private:
// Sessions become if authentication headers
// are sent over them
diff --git a/proxy/http/Http1ClientSession.cc b/proxy/http/Http1ClientSession.cc
index 9670dee..d070bd9 100644
--- a/proxy/http/Http1ClientSession.cc
+++ b/proxy/http/Http1ClientSession.cc
@@ -468,7 +468,7 @@ Http1ClientSession::attach_server_session(PoolableSession
*ssession, bool transa
// have it call the client session back. This IO also prevent
// the server net conneciton from calling back a dead sm
SET_HANDLER(&Http1ClientSession::state_keep_alive);
- slave_ka_vio = ssession->do_io_read(this, 0, nullptr);
+ slave_ka_vio = ssession->do_io_read(this, INT64_MAX,
ssession->get_reader()->mbuf);
ink_assert(slave_ka_vio != ka_vio);
// Transfer control of the write side as well
diff --git a/proxy/http/Http1ServerSession.h b/proxy/http/Http1ServerSession.h
index 0de92de..c74cc80 100644
--- a/proxy/http/Http1ServerSession.h
+++ b/proxy/http/Http1ServerSession.h
@@ -76,7 +76,7 @@ public:
void start() override;
void enable_outbound_connection_tracking(OutboundConnTrack::Group *group);
- IOBufferReader *get_reader();
+ IOBufferReader *get_reader() override;
void attach_hostname(const char *hostname);
IpEndpoint const &get_server_ip() const;
diff --git a/proxy/http/HttpSessionManager.cc b/proxy/http/HttpSessionManager.cc
index a91cbcb..7dc21ce 100644
--- a/proxy/http/HttpSessionManager.cc
+++ b/proxy/http/HttpSessionManager.cc
@@ -206,7 +206,9 @@ ServerSessionPool::releaseSession(PoolableSession *ss)
// if it closes on us. We will get called back in the
// continuation for this bucket, ensuring we have the lock
// to remove the connection from our lists
- ss->do_io_read(this, 0, nullptr);
+ // Actually need to have a buffer here, otherwise the vc is
+ // disabled
+ ss->do_io_read(this, INT64_MAX, ss->get_reader()->mbuf);
// Transfer control of the write side as well
ss->do_io_write(this, 0, nullptr);