agoragames / haigha

AMQP Python client
BSD 3-Clause "New" or "Revised" License
160 stars 41 forks source link

system call interupt not handled in read() #44

Closed alexcb closed 10 years ago

alexcb commented 10 years ago

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 commented 10 years ago

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