mirror of
https://github.com/facebook/proxygen.git
synced 2026-10-24 01:33:54 +03:00
remove HQSession::cleanupUnboundPushStreams
Summary: removes `HQSession::cleanupUnboundPushStreams`, its override, and its caller, continued efforts to remove all things http push related in proxygen/lib Reviewed By: Carl-Elkhoury, jbeshay Differential Revision: D124393466 fbshipit-source-id: 48dad4045d102ff1ce7164e92845cab5d3c13bda
This commit is contained in:
committed by
meta-codesync[bot]
parent
6144c741c0
commit
45e4365dcd
@@ -1427,30 +1427,17 @@ void HQSession::rejectStream(quic::StreamId id, HTTP3::ErrorCode err) {
|
||||
sock_->setPeekCallback(id, nullptr);
|
||||
}
|
||||
|
||||
size_t HQSession::cleanupPendingStreams() {
|
||||
std::vector<quic::StreamId> streamsToCleanup;
|
||||
|
||||
void HQSession::cleanupPendingStreams() {
|
||||
// Cleanup pending streams in the dispatchers
|
||||
unidirectionalReadDispatcher_.cleanup();
|
||||
bidirectionalReadDispatcher_.cleanup();
|
||||
|
||||
// These streams have been dispatched as push streams but are missing their
|
||||
// push promise
|
||||
cleanupUnboundPushStreams(streamsToCleanup);
|
||||
|
||||
// Clean up the streams by detaching all callbacks
|
||||
for (auto pendingStreamId : streamsToCleanup) {
|
||||
clearStreamCallbacks(pendingStreamId);
|
||||
}
|
||||
|
||||
auto pending = std::move(pendingWTStreams_);
|
||||
for (const auto& [_, entry] : pending) {
|
||||
for (auto id : entry->streams) {
|
||||
rejectStream(id, kBufferedRejectedErr);
|
||||
}
|
||||
}
|
||||
|
||||
return streamsToCleanup.size();
|
||||
}
|
||||
|
||||
void HQSession::clearStreamCallbacks(quic::StreamId id) {
|
||||
|
||||
@@ -770,9 +770,6 @@ class HQSession
|
||||
HQControlStream* createIngressControlStream(
|
||||
quic::StreamId id, hq::UnidirectionalStreamType streamType);
|
||||
|
||||
virtual void cleanupUnboundPushStreams(std::vector<quic::StreamId>&) {
|
||||
}
|
||||
|
||||
// gets the ALPN from the transport and returns whether the protocol is
|
||||
// supported. Drops the connection if not supported
|
||||
bool getAndCheckApplicationProtocol();
|
||||
@@ -1917,7 +1914,7 @@ class HQSession
|
||||
quic::HTTPPriorityQueue httpPriorityQueue_;
|
||||
|
||||
// Cleanup all pending streams. Invoked in session timeout
|
||||
size_t cleanupPendingStreams();
|
||||
void cleanupPendingStreams();
|
||||
|
||||
// Remove all callbacks from a stream during cleanup
|
||||
void clearStreamCallbacks(quic::StreamId /* id */);
|
||||
|
||||
@@ -238,14 +238,4 @@ void HQUpstreamSession::eraseUnboundStream(HQStreamTransportBase* hqStream) {
|
||||
ingressPushStreams_.erase(pushId);
|
||||
}
|
||||
|
||||
void HQUpstreamSession::cleanupUnboundPushStreams(
|
||||
std::vector<quic::StreamId>& streamsToCleanup) {
|
||||
for (auto& it : streamIdToPushId_) {
|
||||
auto streamId = it.first;
|
||||
auto pushId = it.second;
|
||||
if (!ingressPushStreams_.contains(pushId)) {
|
||||
streamsToCleanup.push_back(streamId);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace proxygen
|
||||
|
||||
@@ -205,8 +205,6 @@ class HQUpstreamSession : public HQSession {
|
||||
|
||||
void eraseUnboundStream(HQStreamTransportBase*) override;
|
||||
|
||||
void cleanupUnboundPushStreams(std::vector<quic::StreamId>&) override;
|
||||
|
||||
void dispatchPushStream(quic::StreamId /* pushStreamId */,
|
||||
hq::PushId /* pushId */,
|
||||
size_t /* toConsume */) override;
|
||||
|
||||
Reference in New Issue
Block a user