Skip to content

Commit

Permalink
[+] adjust check for max path ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanmei-Liu committed Dec 4, 2024
1 parent d0abe05 commit aaf82bb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/transport/xqc_engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ xqc_engine_process_conn(xqc_connection_t *conn, xqc_usec_t now)

xqc_log(conn->log, XQC_LOG_DEBUG, "|create_path_count:%ui|remote_max_path_id:%ui|",
conn->create_path_count, conn->remote_max_path_id);
if (conn->create_path_count == conn->remote_max_path_id
if (conn->create_path_count >= conn->remote_max_path_id + 1
&& conn->conn_type == XQC_CONN_TYPE_CLIENT)
{
ret = xqc_write_path_blocked_to_packet(conn, conn->remote_max_path_id);
Expand Down
2 changes: 1 addition & 1 deletion src/transport/xqc_multipath.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ xqc_path_create(xqc_connection_t *conn, xqc_cid_t *scid, xqc_cid_t *dcid, uint64
{
xqc_path_ctx_t *path = NULL;

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

0 comments on commit aaf82bb

Please sign in to comment.