diff --git a/src/BearSSLClient.cpp b/src/BearSSLClient.cpp index 0e5b31a..3653d90 100644 --- a/src/BearSSLClient.cpp +++ b/src/BearSSLClient.cpp @@ -203,10 +203,11 @@ void BearSSLClient::flush() void BearSSLClient::stop() { if (_client->connected()) { +#if !defined(ARDUINO_BEARSSL_DISABLE_TLS_CLOSE) if ((br_ssl_engine_current_state(&_sc.eng) & BR_SSL_CLOSED) == 0) { br_sslio_close(&_ioc); } - +#endif _client->stop(); } }