Add a function to notify StreamReader when connection from ClientSession is closed.#1323
Merged
asvetlov merged 16 commits intoaio-libs:masterfrom Oct 21, 2016
springmaple:master
Merged
Add a function to notify StreamReader when connection from ClientSession is closed.#1323asvetlov merged 16 commits intoaio-libs:masterfrom springmaple:master
asvetlov merged 16 commits intoaio-libs:masterfrom
springmaple:master
Conversation
Current coverage is 98.51% (diff: 100%)@@ master #1323 diff @@
==========================================
Files 29 29
Lines 6516 6522 +6
Methods 0 0
Messages 0 0
Branches 1094 1095 +1
==========================================
+ Hits 6419 6425 +6
Misses 47 47
Partials 50 50
|
Contributor
Author
|
I need advice whether |
Member
|
Looks good. |
asvetlov
requested changes
Oct 20, 2016
tests/test_py35/test_resp.py
Outdated
| assert resp.status == 200 | ||
|
|
||
|
|
||
| async def test_iter_error_on_conn_close(test_server, loop): |
Member
There was a problem hiding this comment.
Since you change is not Python 3.5 specific and could be executed by Python 3.4 the test should be placed in tests/test_client_functional.py and written with old-styled asyncio.coroutine and yield from.
…nal.py' and fix unhandled exception.
asvetlov
approved these changes
Oct 21, 2016
Member
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What do these changes do?
Raise
ClientDisconnectedError('Connection closed')to StreamReader iteration when connection is forced close programmatically.Are there changes in behavior for the user?
Currently the iteration will stuck for a long time after connection is forced close. The iteration will raise a
ClientDisconnectedErrorimmediately after connection is forced close before EOF is read with this change.Related issue number
#1310
Checklist
CONTRIBUTORS.txtCHANGES.rst#isuue_numberformat at the end of changelog message. Use Pull Request number if there are no issues for PR or PR covers the issue only partially.