mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-08-22 10:39:52 +00:00
fix: bound map TLS handshake latency
This commit is contained in:
@@ -32,6 +32,10 @@ TileTransportResult MapTileHttpArduino::start(const char* url, const char* user_
|
||||
|
||||
client_.setCACert(ca_certificate);
|
||||
client_.setTimeout(read_timeout_ms);
|
||||
unsigned long handshake_seconds = static_cast<unsigned long>(connect_timeout_ms / 1000U);
|
||||
if ((connect_timeout_ms % 1000U) != 0U) ++handshake_seconds;
|
||||
if (handshake_seconds == 0UL) handshake_seconds = 1UL;
|
||||
client_.setHandshakeTimeout(handshake_seconds);
|
||||
http_.setConnectTimeout(boundedConnectTimeout(connect_timeout_ms));
|
||||
http_.setTimeout(boundedReadTimeout(read_timeout_ms));
|
||||
// Keep the single visible-tile TLS session alive across sequential requests.
|
||||
|
||||
@@ -35,6 +35,7 @@ def test_https_adapter_verifies_peer_with_explicit_ca_and_has_no_credentials():
|
||||
assert "setInsecure" not in source
|
||||
assert "setConnectTimeout" in source
|
||||
assert "setTimeout" in source
|
||||
assert "setHandshakeTimeout" in source
|
||||
assert "setReuse(true)" in source
|
||||
assert "useHTTP10(true)" not in source
|
||||
assert "disconnectIdle" in source
|
||||
|
||||
Reference in New Issue
Block a user