lucalas / StreamlabsArduinoAlerts

Library to connect to your Streamlabs account and catch all the Twitch events.
8 stars 1 forks source link

SSL client reconnects after some time #11

Open nedasoo opened 6 months ago

nedasoo commented 6 months ago

Device: ESP32

The socket connection resets every 20 seconds or so. Wifi network itself is not the issue, tried multiple networks. With debugging enabled, serial monitor prints these logs:

[ 95771][V][ssl_client.cpp:68] start_ssl_client(): Starting socket
[ 97086][V][ssl_client.cpp:146] start_ssl_client(): Seeding the random number generator
[ 97087][V][ssl_client.cpp:155] start_ssl_client(): Setting up the SSL/TLS structure...
[ 97091][D][ssl_client.cpp:176] start_ssl_client(): WARNING: Skipping SSL Verification. INSECURE!
[ 97099][V][ssl_client.cpp:254] start_ssl_client(): Setting hostname for TLS session...
[ 97107][V][ssl_client.cpp:269] start_ssl_client(): Performing the SSL/TLS handshake...
[ 99543][V][ssl_client.cpp:290] start_ssl_client(): Verifying peer X.509 certificate...
[ 99544][V][ssl_client.cpp:298] start_ssl_client(): Certificate verified.
[ 99547][V][ssl_client.cpp:313] start_ssl_client(): Free internal heap after TLS 210912
[ 99555][V][ssl_client.cpp:369] send_ssl_data(): Writing HTTP request with 427 bytes...
[ 99955][V][ssl_client.cpp:369] send_ssl_data(): Writing HTTP request with 576 bytes...
[100570][V][ssl_client.cpp:369] send_ssl_data(): Writing HTTP request with 12 bytes...
[100571][V][ssl_client.cpp:369] send_ssl_data(): Writing HTTP request with 7 bytes...
[120003][V][ssl_client.cpp:369] send_ssl_data(): Writing HTTP request with 6 bytes...
[120006][V][ssl_client.cpp:369] send_ssl_data(): Writing HTTP request with 7 bytes...
[136819][V][ssl_client.cpp:369] send_ssl_data(): Writing HTTP request with 8 bytes...
[136822][V][ssl_client.cpp:321] stop_ssl_socket(): Cleaning SSL connection.
[136840][V][ssl_client.cpp:321] stop_ssl_socket(): Cleaning SSL connection.
[137427][V][ssl_client.cpp:62] start_ssl_client(): Free internal heap before TLS 255668
[137427][V][ssl_client.cpp:68] start_ssl_client(): Starting socket

...and the process continues. The library works in theory, but I don't want to miss an event coming in at the exact time the connection is interrupting, thus missing the event.