ui: increast default timeouts per KB for XFTP (#3094)

This commit is contained in:
Evgeny Poberezkin 2023-09-21 18:21:49 +01:00 committed by GitHub
parent 2d7655281f
commit b7c562fb10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 6 deletions

View File

@ -53,7 +53,7 @@ struct AdvancedNetworkSettings: View {
timeoutSettingPicker("TCP connection timeout", selection: $netCfg.tcpConnectTimeout, values: [5_000000, 7_500000, 10_000000, 15_000000, 20_000000, 30_000000, 45_000000], label: secondsLabel) timeoutSettingPicker("TCP connection timeout", selection: $netCfg.tcpConnectTimeout, values: [5_000000, 7_500000, 10_000000, 15_000000, 20_000000, 30_000000, 45_000000], label: secondsLabel)
timeoutSettingPicker("Protocol timeout", selection: $netCfg.tcpTimeout, values: [3_000000, 5_000000, 7_000000, 10_000000, 15_000000, 20_000000, 30_000000], label: secondsLabel) timeoutSettingPicker("Protocol timeout", selection: $netCfg.tcpTimeout, values: [3_000000, 5_000000, 7_000000, 10_000000, 15_000000, 20_000000, 30_000000], label: secondsLabel)
timeoutSettingPicker("Protocol timeout per KB", selection: $netCfg.tcpTimeoutPerKb, values: [10_000, 20_000, 40_000, 75_000, 100_000], label: secondsLabel) timeoutSettingPicker("Protocol timeout per KB", selection: $netCfg.tcpTimeoutPerKb, values: [15_000, 30_000, 60_000, 90_000, 120_000], label: secondsLabel)
timeoutSettingPicker("PING interval", selection: $netCfg.smpPingInterval, values: [120_000000, 300_000000, 600_000000, 1200_000000, 2400_000000, 3600_000000], label: secondsLabel) timeoutSettingPicker("PING interval", selection: $netCfg.smpPingInterval, values: [120_000000, 300_000000, 600_000000, 1200_000000, 2400_000000, 3600_000000], label: secondsLabel)
intSettingPicker("PING count", selection: $netCfg.smpPingCount, values: [1, 2, 3, 5, 8], label: "") intSettingPicker("PING count", selection: $netCfg.smpPingCount, values: [1, 2, 3, 5, 8], label: "")
Toggle("Enable TCP keep-alive", isOn: $enableKeepAlive) Toggle("Enable TCP keep-alive", isOn: $enableKeepAlive)

View File

@ -1092,7 +1092,7 @@ public struct NetCfg: Codable, Equatable {
sessionMode: TransportSessionMode.user, sessionMode: TransportSessionMode.user,
tcpConnectTimeout: 15_000_000, tcpConnectTimeout: 15_000_000,
tcpTimeout: 10_000_000, tcpTimeout: 10_000_000,
tcpTimeoutPerKb: 20_000, tcpTimeoutPerKb: 30_000,
tcpKeepAlive: KeepAliveOpts.defaults, tcpKeepAlive: KeepAliveOpts.defaults,
smpPingInterval: 1200_000_000, smpPingInterval: 1200_000_000,
smpPingCount: 3, smpPingCount: 3,
@ -1104,7 +1104,7 @@ public struct NetCfg: Codable, Equatable {
sessionMode: TransportSessionMode.user, sessionMode: TransportSessionMode.user,
tcpConnectTimeout: 30_000_000, tcpConnectTimeout: 30_000_000,
tcpTimeout: 20_000_000, tcpTimeout: 20_000_000,
tcpTimeoutPerKb: 40_000, tcpTimeoutPerKb: 60_000,
tcpKeepAlive: KeepAliveOpts.defaults, tcpKeepAlive: KeepAliveOpts.defaults,
smpPingInterval: 1200_000_000, smpPingInterval: 1200_000_000,
smpPingCount: 3, smpPingCount: 3,

View File

@ -2392,7 +2392,7 @@ data class NetCfg(
sessionMode = TransportSessionMode.User, sessionMode = TransportSessionMode.User,
tcpConnectTimeout = 15_000_000, tcpConnectTimeout = 15_000_000,
tcpTimeout = 10_000_000, tcpTimeout = 10_000_000,
tcpTimeoutPerKb = 20_000, tcpTimeoutPerKb = 30_000,
tcpKeepAlive = KeepAliveOpts.defaults, tcpKeepAlive = KeepAliveOpts.defaults,
smpPingInterval = 1200_000_000, smpPingInterval = 1200_000_000,
smpPingCount = 3 smpPingCount = 3
@ -2406,7 +2406,7 @@ data class NetCfg(
sessionMode = TransportSessionMode.User, sessionMode = TransportSessionMode.User,
tcpConnectTimeout = 30_000_000, tcpConnectTimeout = 30_000_000,
tcpTimeout = 20_000_000, tcpTimeout = 20_000_000,
tcpTimeoutPerKb = 40_000, tcpTimeoutPerKb = 60_000,
tcpKeepAlive = KeepAliveOpts.defaults, tcpKeepAlive = KeepAliveOpts.defaults,
smpPingInterval = 1200_000_000, smpPingInterval = 1200_000_000,
smpPingCount = 3 smpPingCount = 3

View File

@ -164,9 +164,10 @@ fun AdvancedNetworkSettingsView(chatModel: ChatModel) {
) )
} }
SectionItemView { SectionItemView {
// can't be higher than 130ms to avoid overflow on 32bit systems
TimeoutSettingRow( TimeoutSettingRow(
stringResource(MR.strings.network_option_protocol_timeout_per_kb), networkTCPTimeoutPerKb, stringResource(MR.strings.network_option_protocol_timeout_per_kb), networkTCPTimeoutPerKb,
listOf(10_000, 20_000, 40_000, 75_000, 100_000), secondsLabel listOf(15_000, 30_000, 60_000, 90_000, 120_000), secondsLabel
) )
} }
SectionItemView { SectionItemView {