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

Synchronous basic.get with consumer=None is broken #102

Closed
WGH- opened this issue Jun 20, 2019 · 1 comment
Closed

Synchronous basic.get with consumer=None is broken #102

WGH- opened this issue Jun 20, 2019 · 1 comment

Comments

@WGH-
Copy link

WGH- commented Jun 20, 2019

class SyncWrapper(object):
    def __call__(self, *args, **kwargs):
        self._read = False
        self._result = self._cb(*args, **kwargs)

The problem here is self._cb might throw FrameUnderflow exception (easy to reproduce if you have large messages), but it happens after self._read is set to False. It causes while wrapper._read to terminate early, when wrapper._result is still None, and thus message will be lost.

I'm not sure how to fix it, though.

@WGH-
Copy link
Author

WGH- commented Jun 20, 2019

Sorry, dup of #83

@WGH- WGH- closed this as completed Jun 20, 2019
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

No branches or pull requests

1 participant