Skip to content

Commit 9820fcb

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 d1efc19 commit 9820fcb

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
@@ -3217,7 +3217,7 @@ conf_bridge_node_init(conf_bridge_node *node)
32173217
node->qidle_timeout = 60; // Disconnect after idle
32183218
node->qsend_idle_timeout = 2;
32193219
node->qinitial_rtt_ms = 800; // Ms
3220-
node->qmax_ack_delay_ms = 100;
3220+
node->qmax_ack_delay_ms = 100; // Ms
32213221
node->qcongestion_control = 1; // QUIC_CONGESTION_CONTROL_ALGORITHM_CUBIC
32223222
node->quic_0rtt = true;
32233223
#endif

src/supplemental/nanolib/conf_ver2.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,6 +1221,10 @@ conf_bridge_quic_parse_ver2(conf_bridge_node *node, cJSON *jso_bridge_node)
12211221
node, qinitial_rtt_ms, "quic_initial_rtt_ms", jso_bridge_node);
12221222
hocon_read_time_ms(
12231223
node, qmax_ack_delay_ms, "quic_max_ack_delay_ms", jso_bridge_node);
1224+
if (node->qmax_ack_delay_ms > 16000) {
1225+
node->qmax_ack_delay_ms = 16000;
1226+
log_warn("max ack delay ms is too large, reset to 16000ms");
1227+
}
12241228
hocon_read_time_base(
12251229
node, qconnect_timeout, "quic_handshake_timeout", jso_bridge_node);
12261230
hocon_read_bool_base(node, quic_0rtt, "quic_0rtt", jso_bridge_node);

0 commit comments

Comments
 (0)