Skip to content

Commit 4495261

Browse files
Jacob Steinebronnfacebook-github-bot
authored andcommitted
Client silent error
Summary: - `LifecycleObserver::onIngressEOF()` should've provided a ref to which session read an EOF, so I added that, cc hanidamlaj - On a secure connection with no txn served, bump kErrorClientSilent Reviewed By: hanidamlaj Differential Revision: D82587556 fbshipit-source-id: 53991cd0b86dad153696f44fbf64fc8d9a88faa6
1 parent b2613e9 commit 4495261

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

proxygen/lib/http/coro/HTTPCoroSession.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2508,7 +2508,7 @@ folly::coro::Task<void> HTTPUniplexTransportSession::readLoop() noexcept {
25082508
}
25092509
if (*rc == 0) { // peer closed the connection
25102510
XLOG(DBG4) << "Read EOF sess=" << *this;
2511-
deliverLifecycleEvent(&LifecycleObserver::onIngressEOF);
2511+
deliverLifecycleEvent(&LifecycleObserver::onIngressEOF, *this);
25122512
codec_->onIngressEOF();
25132513
for (auto& [_, stream] : streams_) {
25142514
stream->abortIngress(HTTPErrorCode::TRANSPORT_EOF);

proxygen/lib/http/coro/HTTPCoroSession.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class LifecycleObserver {
127127
}
128128
virtual void onIngressError(const HTTPCoroSession&, ProxygenError) {
129129
}
130-
virtual void onIngressEOF() {
130+
virtual void onIngressEOF(const HTTPCoroSession&) {
131131
}
132132
virtual void onRequestBegin(const HTTPCoroSession&) {
133133
}

proxygen/lib/http/coro/test/HTTPCoroSessionTests.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class MockLifecycleObserver : public LifecycleObserver {
176176
// MOCK_METHOD(void, onConnectionError, (const HTTPCoroSession&));
177177
// MOCK_METHOD(void, onFullHandshakeCompletion, (const HTTPCoroSession&));
178178
MOCK_METHOD(void, onIngressError, (const HTTPCoroSession &, ProxygenError));
179-
MOCK_METHOD(void, onIngressEOF, ());
179+
MOCK_METHOD(void, onIngressEOF, (const HTTPCoroSession &));
180180
MOCK_METHOD(void,
181181
onRead,
182182
(const HTTPCoroSession &,

proxygen/lib/http/coro/test/HTTPDownstreamCoroSessionTests.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,7 +1550,7 @@ TEST_P(HTTPDownstreamSessionTest, LifecycleObserver) {
15501550
EXPECT_CALL(lifecycleCb, onActivateConnection(_));
15511551
EXPECT_CALL(lifecycleCb, onIngressMessage(_, _));
15521552
if (IS_H1()) {
1553-
EXPECT_CALL(lifecycleCb, onIngressEOF());
1553+
EXPECT_CALL(lifecycleCb, onIngressEOF(_));
15541554
}
15551555
EXPECT_CALL(lifecycleCb, onWrite(_, _)).Times(AtLeast(1));
15561556
EXPECT_CALL(lifecycleCb, onRequestEnd(_, _));
@@ -1627,8 +1627,8 @@ TEST_P(HTTPDownstreamSessionTest, LifecycleObserverRemoveCallback) {
16271627
EXPECT_CALL(otherLifecycleCb, onIngressMessage(_, _)).Times(0);
16281628

16291629
if (IS_H1()) {
1630-
EXPECT_CALL(lifecycleCb, onIngressEOF());
1631-
EXPECT_CALL(otherLifecycleCb, onIngressEOF()).Times(0);
1630+
EXPECT_CALL(lifecycleCb, onIngressEOF(_));
1631+
EXPECT_CALL(otherLifecycleCb, onIngressEOF(_)).Times(0);
16321632
}
16331633
EXPECT_CALL(lifecycleCb, onWrite(_, _)).Times(AtLeast(1));
16341634
EXPECT_CALL(otherLifecycleCb, onWrite(_, _)).Times(AnyNumber());
@@ -1713,8 +1713,8 @@ TEST_P(HTTPDownstreamSessionTest, MultiLifecycleObserver) {
17131713
EXPECT_CALL(lifecycleCb, onIngressMessage(_, _));
17141714
EXPECT_CALL(otherLifecycleCb, onIngressMessage(_, _));
17151715
if (IS_H1()) {
1716-
EXPECT_CALL(lifecycleCb, onIngressEOF());
1717-
EXPECT_CALL(otherLifecycleCb, onIngressEOF());
1716+
EXPECT_CALL(lifecycleCb, onIngressEOF(_));
1717+
EXPECT_CALL(otherLifecycleCb, onIngressEOF(_));
17181718
}
17191719
EXPECT_CALL(lifecycleCb, onWrite(_, _)).Times(AtLeast(1));
17201720
EXPECT_CALL(otherLifecycleCb, onWrite(_, _)).Times(AtLeast(1));

0 commit comments

Comments
 (0)