fix: 上行分发前统一限速,send 不再单独扣桶

This commit is contained in:
Nixevol
2026-09-30 15:00:06 +08:00
parent ac90495137
commit af8278d2a9
7 changed files with 155 additions and 13 deletions
-3
View File
@@ -21,9 +21,6 @@ func (a *App) Submit(ctx context.Context, senderID string, conn port.ConnInfo, r
return SubmitResult{}, errCode(protocol.CodeBadRequest, "invalid sender")
}
now := a.now()
if !a.rates.allow(senderID, now) {
return SubmitResult{}, errCode(protocol.CodeRateLimited, "request rate exceeded")
}
if err := req.Validate(a.protocolLimits()); err != nil {
return SubmitResult{}, err