1. Benjamin Smith
  2. python-stomp
  3. Issues
Issue #8 resolved

EAGAIN not cross-platform compatible

Tony
created an issue

I'd like to suggest a very small change to python-stomp/stompy/frame.py:

Replace (line 4):

{{{

!python

from errno import EAGAIN }}}

with:

{{{

!python

from errno import EWOULDBLOCK }}}

and, on line 270, replace:

{{{

!python

if exc[0] == EAGAIN: }}}

with:

{{{

!python

if exc[0] == EWOULDBLOCK: }}}

Windows doesn't use EAGAIN for a failed recv request from a blocking socket - instead it uses EWOULDBLOCK (which is the same as EAGAIN on *nix platforms, so it would be cross-platform compatible).

Comments (4)

  1. Log in to comment