You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Make TCP connect timeout configurable (remove hardcoded 75s) #116
When using a SSL Client over TinyGSM (eg. GovoroxSSLClient), the SSL wrapper calls client.connect(host, port) with no timeout parameter.
In TinyGSM, this path falls back to a hardcoded 75 second TCP connect timeout, which is far too long for embedded use and easily trips the Task Watchdog (TWDT) when a broker is unreachable or the network is poor.
This timeout is currently not configurable via compile-time or runtime, the base Client interface (which must work for both Wi-Fi and GSM clients) cannot pass a third “timeout” argument.
Expected behavior
The TCP connect timeout should not be hardcoded.
Library users should be able to customize the connect timeout:
at compile time via a #define
and at runtime via a setter on the client (so higher layers like SSL can configure it without changing call signatures).
Proposed solution
Add a compile-time default:
// in TinyGsmClient.h (or common config)
#ifndef TINYGSM_TCP_CONNECT_TIMEOUT_MS
#define TINYGSM_TCP_CONNECT_TIMEOUT_MS 75000
#endif
Add a runtime-settable member + setter on the GsmClient class:
The following fields are missing: Description, Steps to Reproduce, Expected Behavior, Actual Behavior, Environment, IDE. Please update the issue with this information.
Activity
github-actions commentedon Sep 23, 2025
The following fields are missing: Description, Steps to Reproduce, Expected Behavior, Actual Behavior, Environment, IDE. Please update the issue with this information.