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

Add a function to notify StreamReader when connection from ClientSession is closed. #1323

Merged
merged 16 commits into from
Oct 21, 2016
Merged
Prev Previous commit
Next Next commit
Fix content is NoneType error.
  • Loading branch information
springmaple committed Oct 20, 2016
commit 307ad92a8eb530503c0f1bac09cf927530aa0f49
2 changes: 1 addition & 1 deletion aiohttp/client_reqrep.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ def _cleanup_writer(self):
self._writer = None

def _notify_content(self):
if self.content.exception() is None:
if self.content and self.content.exception() is None:
self.content.set_exception(
aiohttp.ClientDisconnectedError('Connection closed'))

Expand Down