Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print stacktrace when catching TimeoutError #3414

Merged
merged 4 commits into from
Dec 1, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES/3414.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix `asyncio.TimeoutError` stack trace not logged, when it is caught
in the handler.
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Paulius Šileikis
Paulus Schoutsen
Pavel Kamaev
Pavel Polyakov
Pawel Kowalski
Pawel Miech
Pepe Osca
Philipp A.
Expand Down
4 changes: 2 additions & 2 deletions aiohttp/web_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ async def start(self) -> None:
except asyncio.CancelledError:
self.log_debug('Ignored premature client disconnection')
break
except asyncio.TimeoutError:
except asyncio.TimeoutError as exc:
self.log_debug('Request handler timed out.')
resp = self.handle_error(request, 504)
resp = self.handle_error(request, 504, exc)
except Exception as exc:
resp = self.handle_error(request, 500, exc)
else:
Expand Down