Skip to content

Commit f453b66

Browse files
wanghaEMQJaylinYu
authored andcommitted
* FIX [conf] reset max_ack_delay_ms to 16000ms when it's too large.
Signed-off-by: wangha <wanghamax@gmail.com>
1 parent e587c4b commit f453b66

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/supplemental/nanolib/conf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3174,7 +3174,7 @@ conf_bridge_node_init(conf_bridge_node *node)
31743174
node->qidle_timeout = 60; // Disconnect after idle
31753175
node->qsend_idle_timeout = 2;
31763176
node->qinitial_rtt_ms = 800; // Ms
3177-
node->qmax_ack_delay_ms = 100;
3177+
node->qmax_ack_delay_ms = 100; // Ms
31783178
node->qcongestion_control = 1; // QUIC_CONGESTION_CONTROL_ALGORITHM_CUBIC
31793179
node->quic_0rtt = true;
31803180
#endif

src/supplemental/nanolib/conf_ver2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,6 +1125,10 @@ conf_bridge_quic_parse_ver2(conf_bridge_node *node, cJSON *jso_bridge_node)
11251125
node, qinitial_rtt_ms, "quic_initial_rtt_ms", jso_bridge_node);
11261126
hocon_read_time_ms(
11271127
node, qmax_ack_delay_ms, "quic_max_ack_delay_ms", jso_bridge_node);
1128+
if (node->qmax_ack_delay_ms > 16000) {
1129+
node->qmax_ack_delay_ms = 16000;
1130+
log_warn("max ack delay ms is too large, reset to 16000ms");
1131+
}
11281132
hocon_read_time_base(
11291133
node, qconnect_timeout, "quic_handshake_timeout", jso_bridge_node);
11301134
hocon_read_bool_base(node, quic_0rtt, "quic_0rtt", jso_bridge_node);

0 commit comments

Comments
 (0)