Fix: RateLimit requests were not released when a streaming generation exception occurred (#11540)

This commit is contained in:
liuzhenghua
2024-12-11 19:16:35 +08:00
committed by Joel
parent 708c1a19a1
commit ec1efe5d54
2 changed files with 4 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class RateLimitGenerator:
raise StopIteration
try:
return next(self.generator)
except StopIteration:
except Exception:
self.close()
raise