Skip to content

Commit 6587daa

Browse files
committed
[!] fix RETIRE_CID error when suffering severe loss
1 parent 6c0d234 commit 6587daa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/transport/xqc_cid.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ xqc_int_t
250250
xqc_cid_switch_to_next_state(xqc_cid_set_t *cid_set, xqc_cid_inner_t *cid, xqc_cid_state_t next_state)
251251
{
252252
if (xqc_cid_in_cid_set(cid_set, &cid->cid) == NULL) {
253-
return -XQC_ECONN_CID_NOT_FOUND;
253+
return XQC_OK;
254254
}
255255

256256
xqc_cid_state_t current_state = cid->state;
@@ -259,7 +259,7 @@ xqc_cid_switch_to_next_state(xqc_cid_set_t *cid_set, xqc_cid_inner_t *cid, xqc_c
259259
return XQC_OK;
260260

261261
} else if (current_state > next_state) {
262-
return -XQC_ECID_STATE;
262+
return XQC_OK;
263263
}
264264

265265
/* current_state < next_state */

src/transport/xqc_conn.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -4475,7 +4475,7 @@ xqc_conn_set_cid_retired_ts(xqc_connection_t *conn, xqc_cid_inner_t *inner_cid)
44754475

44764476
ret = xqc_cid_switch_to_next_state(&conn->scid_set.cid_set, inner_cid, XQC_CID_RETIRED);
44774477
if (ret != XQC_OK) {
4478-
xqc_log(conn->log, XQC_LOG_ERROR, "|set cid retired error|");
4478+
xqc_log(conn->log, XQC_LOG_ERROR, "|set cid retired error|ret:%d", ret);
44794479
return ret;
44804480
}
44814481

0 commit comments

Comments
 (0)