Skip to content

Conversation

@1st1
Copy link
Member

@1st1 1st1 commented Dec 14, 2017

@JulienPalard
Copy link
Member

LGTM

# accept4, so the returned socket is always blocking.
type = self.type & ~globals().get("SOCK_NONBLOCK", 0)
type = self.type
if _SOCK_NONBLOCK:
Copy link
Contributor

@asvetlov asvetlov Dec 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either _SOCK_NONBLOCK should be None if not present in socket -- then if _SOCK_NONBLOCK is not None: will be very fast check.
Or drop if: type & ~0 works pretty well

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with Andrew, I don't think that the if is needed.

@asvetlov
Copy link
Contributor

Should we close the issue?
socket.type is fixed, isn't it?

@1st1
Copy link
Member Author

1st1 commented Dec 20, 2017

Yes, closing this one.

@1st1 1st1 closed this Dec 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants