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

system call interupt not handled in read() #44

Closed
alexcb opened this issue Dec 5, 2013 · 1 comment · Fixed by #46
Closed

system call interupt not handled in read() #44

alexcb opened this issue Dec 5, 2013 · 1 comment · Fixed by #46

Comments

@alexcb
Copy link

alexcb commented Dec 5, 2013

https://github.com/agoragames/haigha/blob/master/haigha/transports/socket_transport.py#L79

I've noticed some cases where an errno.EINTR is raised here due to an interrupted system call.

Would it be possible to change this to:

if e.errno in (errno.EAGAIN,errno.EWOULDBLOCK, errno.EINTR):

so we can just ignore these and carry on.

Thanks,
Alex

@awestendorf
Copy link
Member

Sure. You're welcome to submit a PR with a test case if you'd like.

awestendorf added a commit that referenced this issue Mar 21, 2014
awestendorf added a commit that referenced this issue Mar 27, 2014
…ynchronously

Adds ability of channels to act synchronously on top of an asynchronous
transport
Adds ability to enforce a synchronous connection handshake on an
asynchronous transport
Catch `EINTR` in a read loop, raise all other read exceptions to fix #44
Immediately closes a connection and raises ConnectionClosed if there is
a frame error when reading from the broker
Immediately closes a connection and raises ConnectionClosed if user
tries to send a frame that is larger than negotiated frame max
Adds Connection.closed property
awestendorf added a commit that referenced this issue Mar 27, 2014
Adds ability of asynchronous transports, such as gevent, to operate synchronously
Adds ability of channels to act synchronously on top of an asynchronous
transport
Adds ability to enforce a synchronous connection handshake on an
asynchronous transport
Catch `EINTR` in a read loop, raise all other read exceptions to fix #44
Immediately closes a connection and raises ConnectionClosed if there is
a frame error when reading from the broker
Immediately closes a connection and raises ConnectionClosed if user
tries to send a frame that is larger than negotiated frame max
Adds Connection.closed property
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 a pull request may close this issue.

2 participants