Skip to content

Commit aaf82bb

Browse files
committed
[+] adjust check for max path ids
1 parent d0abe05 commit aaf82bb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/transport/xqc_engine.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ xqc_engine_process_conn(xqc_connection_t *conn, xqc_usec_t now)
742742

743743
xqc_log(conn->log, XQC_LOG_DEBUG, "|create_path_count:%ui|remote_max_path_id:%ui|",
744744
conn->create_path_count, conn->remote_max_path_id);
745-
if (conn->create_path_count == conn->remote_max_path_id
745+
if (conn->create_path_count >= conn->remote_max_path_id + 1
746746
&& conn->conn_type == XQC_CONN_TYPE_CLIENT)
747747
{
748748
ret = xqc_write_path_blocked_to_packet(conn, conn->remote_max_path_id);

src/transport/xqc_multipath.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ xqc_path_create(xqc_connection_t *conn, xqc_cid_t *scid, xqc_cid_t *dcid, uint64
7575
{
7676
xqc_path_ctx_t *path = NULL;
7777

78-
if (conn->create_path_count > xqc_min(conn->local_max_path_id, conn->remote_max_path_id)) {
78+
if (conn->create_path_count > xqc_min(conn->local_max_path_id, conn->remote_max_path_id) + 1) {
7979
xqc_log(conn->log, XQC_LOG_ERROR,
8080
"|too many paths|current maximum:%d|", XQC_MAX_PATHS_COUNT);
8181
return NULL;

0 commit comments

Comments
 (0)