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

Is _backwards_compatible_sock flag still needed #204

Open
justmobilize opened this issue Feb 17, 2024 · 1 comment
Open

Is _backwards_compatible_sock flag still needed #204

justmobilize opened this issue Feb 17, 2024 · 1 comment

Comments

@justmobilize
Copy link
Collaborator

justmobilize commented Feb 17, 2024

Is _backwards_compatible_sock flag still needed? In MQTT._sock_exact_recv there is this code:

        if not self._backwards_compatible_sock:
            # CPython/Socketpool Impl.
            ...

        else:  # ESP32SPI Impl.
            # This will timeout with socket timeout (not keepalive timeout)
            ...

This flag is set by:

self._backwards_compatible_sock = not hasattr(sock, "recv_into")

here

Yet at this point both the ESP32SPI library and WIZNET5k library have recv_into.

The FONA library is the only one I see that doesn't

@justmobilize
Copy link
Collaborator Author

@dhalbert with the cleanup, I would LOVE to pull out the code path in _sock_exact_recv that checks against _backwards_compatible_sock

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