Skip to content

Commit

Permalink
Fix comparison warning in http2_rpc_protocol.cpp (#2626)
Browse files Browse the repository at this point in the history
  • Loading branch information
imdouyu committed May 6, 2024
1 parent 4c5fad0 commit edb9caf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/brpc/policy/http2_rpc_protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ H2ParseResult H2StreamContext::OnData(

const int64_t acc = _deferred_window_update.fetch_add(frag_size, butil::memory_order_relaxed) + frag_size;
// Allocate the quota of the window to each stream.
if (acc >= _conn_ctx->local_settings().stream_window_size / (_conn_ctx->VolatilePendingStreamSize() + 1)) {
if (acc >= static_cast<int64_t>(_conn_ctx->local_settings().stream_window_size) / (_conn_ctx->VolatilePendingStreamSize() + 1)) {
if (acc > _conn_ctx->local_settings().stream_window_size) {
LOG(ERROR) << "Fail to satisfy the stream-level flow control policy";
return MakeH2Error(H2_FLOW_CONTROL_ERROR, frame_head.stream_id);
Expand Down

0 comments on commit edb9caf

Please sign in to comment.