-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Description
The doc for ikcp_check says:
Determine when should you invoke ikcp_update
and in ikcp_check
Line 1211 in f4f3a89
| tm_flush = _itimediff(ts_flush, current); |
Line 1222 in f4f3a89
| minimal = (IUINT32)(tm_packet < tm_flush ? tm_packet : tm_flush); |
the return timepoint may be less than
ts_flush.
However, in ikcp_update
Line 1164 in f4f3a89
| slap = _itimediff(kcp->current, kcp->ts_flush); |
Lines 1171 to 1177 in f4f3a89
| if (slap >= 0) { | |
| kcp->ts_flush += kcp->interval; | |
| if (_itimediff(kcp->current, kcp->ts_flush) >= 0) { | |
| kcp->ts_flush = kcp->current + kcp->interval; | |
| } | |
| ikcp_flush(kcp); | |
| } |
ikcp_flush is called only if the current timepoint is greater or equal to ts_flush, which makes ikcp_check pointless.
Metadata
Metadata
Assignees
Labels
No labels