-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Is break in finally intentional? #445
Comments
I do not really remember, but good catch let's replace with returns Sent from my iPhone
|
Fix #445: replace break with return on server connection cleanups
In low-level server code I see
break
statements insidefinally
blocks like https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/server.py#L290It looks suspicious:
break
insidefinally
block discards saved exception (see https://docs.python.org/3.5/reference/simple_stmts.html#break).I believe
return
should be used instead, it does the same in the case (stop reading incoming data) but it is show the intention much more explicitly.@fafhrd91 you are author of these lines. Do you remember the motivation for
break
statement?The text was updated successfully, but these errors were encountered: