Skip to content

limithandler: Return error from limit handler

John Cai requested to merge jc-fix-limiter-streaming into master

In c83f0005 (add concurrency queue limit 2022-01-24), we modified the limit handler to return immediately with an error if certain limit conditions are reached.

In the wrappedStream however, RecvMsg() merely logs the error. This will block indefinitely, because when the limiter returns with an error, it will no longer try to get a concurrency slot. Thus this function will wait until the context is cancelled.

Fix this by returning an error when we get an error from the limiter.

Changelog: fixed

Merge request reports