MCPcopy Create free account
hub / github.com/apache/brpc / RemoveStreamAndDeferWU

Method RemoveStreamAndDeferWU

src/brpc/policy/http2_rpc_protocol.cpp:373–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

371}
372
373H2StreamContext* H2Context::RemoveStreamAndDeferWU(int stream_id) {
374 H2StreamContext* sctx = NULL;
375 {
376 std::unique_lock<butil::Mutex> mu(_stream_mutex);
377 if (!_pending_streams.erase(stream_id, &sctx)) {
378 return NULL;
379 }
380 }
381 // The remote stream will not send any more data, sending back the
382 // stream-level WINDOW_UPDATE is pointless, just move the value into
383 // the connection.
384 DeferWindowUpdate(sctx->ReleaseDeferredWindowUpdate());
385 return sctx;
386}
387
388void H2Context::RemoveGoAwayStreams(
389 int goaway_stream_id, std::vector<H2StreamContext*>* out_streams) {

Callers 2

OnResetStreamMethod · 0.80
OnEndStreamMethod · 0.80

Calls 2

eraseMethod · 0.45

Tested by

no test coverage detected