Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ list(APPEND BRPC_COMMON_DEFINITIONS
__STDC_FORMAT_MACROS
__STDC_LIMIT_MACROS
__STDC_CONSTANT_MACROS
__STRICT_ANSI__
)

if(WITH_ASAN)
Expand Down
16 changes: 16 additions & 0 deletions src/brpc/policy/http2_rpc_protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1683,6 +1683,22 @@ bool H2Context::FlushPendingData(int stream_id) {
return out.empty() || WriteAck(_socket, &out) == 0;
}

H2UnsentRequest::H2UnsentRequest(Controller* c)
: _nref(1)
, _size(0)
, _stream_id(0)
, _cntl(c) {
#ifndef NDEBUG
get_h2_bvars()->h2_unsent_request_count << 1;
#endif
}

H2UnsentRequest::~H2UnsentRequest() {
#ifndef NDEBUG
get_h2_bvars()->h2_unsent_request_count << -1;
#endif
}

H2UnsentRequest* H2UnsentRequest::New(Controller* c) {
const HttpHeader& h = c->http_request();
const CommonStrings* const common = get_common_strings();
Expand Down
16 changes: 2 additions & 14 deletions src/brpc/policy/http2_rpc_protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,20 +165,8 @@ friend void PackH2Request(butil::IOBuf*, SocketMessage**,
void push(const std::string& name, const std::string& value)
{ new (&_list[_size++]) HPacker::Header(name, value); }

H2UnsentRequest(Controller* c)
: _nref(1)
, _size(0)
, _stream_id(0)
, _cntl(c) {
#ifndef NDEBUG
get_h2_bvars()->h2_unsent_request_count << 1;
#endif
}
~H2UnsentRequest() {
#ifndef NDEBUG
get_h2_bvars()->h2_unsent_request_count << -1;
#endif
}
H2UnsentRequest(Controller* c);
~H2UnsentRequest();
H2UnsentRequest(const H2UnsentRequest&);
void operator=(const H2UnsentRequest&);
void Destroy();
Expand Down
Loading