summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkrequest.cpp
diff options
context:
space:
mode:
authorMate Barany <mate.barany@qt.io>2025-11-11 15:12:26 +0100
committerMate Barany <mate.barany@qt.io>2025-11-25 17:02:22 +0100
commit89bd95df5a0fbec1fb45482b8d9dd260234e47d2 (patch)
treeeb45ab988926dff59933c4cccd50d457bfae6a2a /src/network/access/qnetworkrequest.cpp
parentf216d13b67b9fb73c50593d7ab0047dc3b50805e (diff)
Use environment variables to change TCP keepalive settings in QNAM
TCP keepalive is enabled in QNetworkAccessManager but it uses the default values meaning that it waits for 131 minutes to tear down an inactive connections. Set some more aggressive defaults, so the connection is terminated after 2 minutes of inactivity. In QNetworkAccessManager we don't have direct access to the socket but we might still want to change the default tcp keepalive settings if we find them too agressive or too lenient. Use the following environment variables: QT_QNAM_TCP_KEEPIDLE - keepAliveIdleOption (in seconds) QT_QNAM_TCP_KEEPINTVL - keepAliveIntervalOption (in seconds) QT_QNAM_TCP_KEEPCNT - keepAliveCountOption (number of probes) [ChangeLog][QtNetwork][QNetworkAccessManager] Added new environment variables QT_QNAM_TCP_KEEPIDLE, QT_QNAM_TCP_KEEPINTVL and QT_QNAM_TCP_KEEPCNT to change TCP keepalive options. Set the values in QNAM so that it terminates an inactive connection after 2 minutes. Task-number: QTBUG-136625 Change-Id: I7cb80164cfdfa1db90b5de25ce0e62457fd0e580 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/access/qnetworkrequest.cpp')
0 files changed, 0 insertions, 0 deletions