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

socket.pyx::connect() has a pointless while(1) loop #36

Open
samrushing opened this issue Dec 12, 2012 · 2 comments
Open

socket.pyx::connect() has a pointless while(1) loop #36

samrushing opened this issue Dec 12, 2012 · 2 comments

Comments

@samrushing
Copy link
Member

Notice that there's no way of running the 'loop' more than once. Can anyone explain this?
I think the loop should just be removed, unlike read/write, you can't call connect() more than once if it blocks.

@halayli
Copy link
Member

halayli commented Dec 12, 2012

If we don't want to handle errno == EAGAIN then I don't see the need for it.

@ehuss
Copy link
Contributor

ehuss commented Dec 12, 2012

Without the history, we could only guess what originally happened. It doesn't look like it handles EAGAIN properly (EAGAIN==EWOULDBLOCK). According to the man page this would only happen if the system runs out of auto-assign ports, in which case it should probably just raise oserror. I would just remove the check for EWOULDBLOCK and remove the while 1, leaving the check for EINPROGRESS as-is.

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

No branches or pull requests

3 participants