Adafruit_CircuitPython_MiniMQTT icon indicating copy to clipboard operation
Adafruit_CircuitPython_MiniMQTT copied to clipboard

Is `_backwards_compatible_sock` flag still needed

Open justmobilize opened this issue 1 year ago • 1 comments

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 avatar Feb 17 '24 23:02 justmobilize