Skip middleware on RequestCancelled (#2720)
This commit is contained in:
parent
53820bc241
commit
ac1f56118a
|
@ -428,7 +428,9 @@ class Http(Stream, metaclass=TouchUpMeta):
|
|||
if self.request is None:
|
||||
self.create_empty_request()
|
||||
|
||||
request_middleware = not isinstance(exception, ServiceUnavailable)
|
||||
request_middleware = not isinstance(
|
||||
exception, (ServiceUnavailable, RequestCancelled)
|
||||
)
|
||||
try:
|
||||
await app.handle_exception(
|
||||
self.request, exception, request_middleware
|
||||
|
|
Loading…
Reference in New Issue
Block a user