Skip to content

Commit 83897d2

Browse files
shinrichzwoop
authored andcommitted
Fix so EOS are delivered to sessions in the pool (#7828)
(cherry picked from commit 9a7742a)
1 parent ed780f2 commit 83897d2

4 files changed

Lines changed: 7 additions & 3 deletions

File tree

proxy/PoolableSession.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ class PoolableSession : public ProxySession
8383

8484
void set_netvc(NetVConnection *newvc);
8585

86+
virtual IOBufferReader *get_reader() = 0;
87+
8688
private:
8789
// Sessions become if authentication headers
8890
// are sent over them

proxy/http/Http1ClientSession.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ Http1ClientSession::attach_server_session(PoolableSession *ssession, bool transa
467467
// have it call the client session back. This IO also prevent
468468
// the server net conneciton from calling back a dead sm
469469
SET_HANDLER(&Http1ClientSession::state_keep_alive);
470-
slave_ka_vio = ssession->do_io_read(this, 0, nullptr);
470+
slave_ka_vio = ssession->do_io_read(this, INT64_MAX, ssession->get_reader()->mbuf);
471471
ink_assert(slave_ka_vio != ka_vio);
472472

473473
// Transfer control of the write side as well

proxy/http/Http1ServerSession.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Http1ServerSession : public PoolableSession
7676
void start() override;
7777

7878
void enable_outbound_connection_tracking(OutboundConnTrack::Group *group);
79-
IOBufferReader *get_reader();
79+
IOBufferReader *get_reader() override;
8080
void attach_hostname(const char *hostname);
8181
IpEndpoint const &get_server_ip() const;
8282

proxy/http/HttpSessionManager.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ ServerSessionPool::releaseSession(PoolableSession *ss)
206206
// if it closes on us. We will get called back in the
207207
// continuation for this bucket, ensuring we have the lock
208208
// to remove the connection from our lists
209-
ss->do_io_read(this, 0, nullptr);
209+
// Actually need to have a buffer here, otherwise the vc is
210+
// disabled
211+
ss->do_io_read(this, INT64_MAX, ss->get_reader()->mbuf);
210212

211213
// Transfer control of the write side as well
212214
ss->do_io_write(this, 0, nullptr);

0 commit comments

Comments
 (0)