esp32_arduino_sqlite3_lib icon indicating copy to clipboard operation
esp32_arduino_sqlite3_lib copied to clipboard

sqlite3_prepare_v2 breaks client.connect()

Open sharkyenergy opened this issue 2 years ago • 5 comments

Hello,

trying again to submit the issue today as it was not working 2 days ago.

first off, thank you for your amazing work.

rc = sqlite3_prepare_v2(db1, sql.c_str(), sql.length()+1, &res, &tail);

If I run above line, the client.connect() function used by AsyncTelegram2 api stops working.


AsyncTelegram2::AsyncTelegram2(Client &client, uint32_t bufferSize)
{
    m_botusername.reserve(32); // Telegram username is 5-32 chars lenght
    m_rxbuffer.reserve(bufferSize);
    this->telegramClient = &client;
    m_minUpdateTime = MIN_UPDATE_TIME;
}
.
.
.
if (!telegramClient->connect(TELEGRAM_HOST, TELEGRAM_PORT))
        {   
            Serial.println("\n\nUnable to connect to Telegram server");
        }

this code in particular is not running anymore after calling sqlite3_prepare_v2. it always returns unable to connect. If I remove your line of code, it works again.

I am on a ESP32 board. Any idea of what might be the cause of it? Thank you!

best regards

Igor

sharkyenergy avatar Nov 21 '22 10:11 sharkyenergy