File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -160,11 +160,16 @@ func (r RateLimitedStartTransactionHandlerImpl) Handle(params transactions.Start
160160
161161func (r RateLimitedCommitTransactionHandlerImpl ) Handle (params transactions.CommitTransactionParams , principal interface {}) middleware.Responder {
162162 res := r .Handler .Handle (params , principal )
163- switch res .(type ) {
163+ switch t := res .(type ) {
164164 case * transactions.CommitTransactionOK :
165165 r .TransactionCounter .Decrease ()
166166 case * transactions.CommitTransactionAccepted :
167167 r .TransactionCounter .Decrease ()
168+ case * transactions.CommitTransactionDefault :
169+ // Decreasing the counter in case of failed transactions
170+ if * t .Payload .Code == 409 {
171+ r .TransactionCounter .Decrease ()
172+ }
168173 }
169174 return res
170175}
You can’t perform that action at this time.
0 commit comments