Skip to content

Commit

Permalink
txHandler: fix ARL triggering without ERL (#5872)
Browse files Browse the repository at this point in the history
  • Loading branch information
algorandskiy authored Dec 15, 2023
1 parent 937c559 commit 8f8ada5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/txHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,10 @@ func (handler *TxHandler) processIncomingTxn(rawmsg network.IncomingMessage) net
var err error
var capguard *util.ErlCapacityGuard
var congested bool
if handler.erl != nil {
if handler.erl != nil || handler.appLimiter != nil {
congested = float64(cap(handler.backlogQueue))*handler.backlogCongestionThreshold < float64(len(handler.backlogQueue))
}
if handler.erl != nil {
// consume a capacity unit
// if the elastic rate limiter cannot vend a capacity, the error it returns
// is sufficient to indicate that we should enable Congestion Control, because
Expand Down

0 comments on commit 8f8ada5

Please sign in to comment.