Skip to content

Calls to stop before connected cause lockups. #13

@bleckers

Description

@bleckers

Describe the bug
Calling sslClient.stop() when !sslClient.connected() causes buffer overflow, even after previously successful connection (and disconnect).

To Reproduce
EthernetClient mqttEthClient;
Ethernet.init(14);
SSLClient sslClient(mqttEthClient, TAs_HTTPS, (size_t)TAs_NUM_HTTPS, RANDOM_DATA_PIN);
sslClient.stop();

Expected behavior
Calls to stop should exit gracefully or ignore the request if already exited.

Context (please complete the following information):

  • Device Type - ESP32/Teensy4
  • Arduino Core Version - Teensyduino 1.52
  • Relevant Library Versions - PubSubClient
  • SSLClient Version - v1.6.6

Additional context
Discovered while trying to make the library robust to internet connectivity issues. Removing jump_handshake in br_ssl_engine_close prevents this (not a fix).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions