majek / puka

Puka - the opinionated RabbitMQ client
https://github.com/majek/puka
Other
182 stars 34 forks source link

ignore EWOULDBLOCK and ENOBUFS when sending #41

Closed schmir closed 11 years ago

schmir commented 11 years ago

this is what the twisted framework also ignores, we trust them here. the previously used EAGAIN is the same as EWOULDBLOCK on linux.

fixes issue #40

schmir commented 11 years ago

and WSAWOULDBLOCK is the same as EWOULDBLOCK on windows.

majek commented 11 years ago

okay?

schmir commented 11 years ago

no!. errno.EAGAIN is 11 on windows, while errno.EWOULDBLOCK is 10035. http://msdn.microsoft.com/en-us/library/5814770t.aspx says

EAGAIN
No more processes. An attempt to create a new process failed because there are no more process slots, or there is not enough memory, or the maximum nesting level has been reached.
majek commented 11 years ago

Now I understand. Okay now?

schmir commented 11 years ago

yes, this should work now.

FYI the reason I declared a module level tuple with these constants, was that I wanted to fail early if one of them wasn't defined.

twisted imports WSAEWOULDBLOCK as EWOULDBLOCK. not sure if the former latter hasn't been defined on some prior python version. 2.7 has errno.EWOULDBLOCK.

majek commented 11 years ago

@schmir Ok. Let's wait for bug reports, I don't think EWOULDBLOCK could be undefined.