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

use EnvironmentError instead of socket.error (closes #939) #1197

Merged
merged 1 commit into from Feb 2, 2016

Conversation

kaniini
Copy link
Contributor

@kaniini kaniini commented Feb 1, 2016

This pull request merges working code to fix the BrokenPipeError exceptions being thrown on Python 3 + eventlet. It has been tested on a large application serving millions of requests hourly.

@tilgovi
Copy link
Collaborator

tilgovi commented Feb 2, 2016

Thanks, @kaniini.

@berkerpeksag can you elaborate on your comment? #939 (comment)

Are you concerned that the exception classes are now more general, and might unintentionally catch errors? I think everything is already re-raised correctly if it's not EPIPE or ECONNRESET.

@berkerpeksag
Copy link
Collaborator

I think EnvironmentError is the most Python 2 and Python 3 compatible way to fix this. We can replace it with OSError when we drop Python 2 support.

@tilgovi
Copy link
Collaborator

tilgovi commented Feb 2, 2016

👍

In that case, this is good to merge from my perspective.

berkerpeksag added a commit that referenced this pull request Feb 2, 2016
use EnvironmentError instead of socket.error (closes #939)
@berkerpeksag berkerpeksag merged commit 012d958 into benoitc:master Feb 2, 2016
@berkerpeksag
Copy link
Collaborator

Thanks!

mjjbell pushed a commit to mjjbell/gunicorn that referenced this pull request Mar 16, 2018
use EnvironmentError instead of socket.error (closes benoitc#939)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants