添加IKCP_FASTACK_CONSERVE宏 避免多次触发快重传 #409
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在ikcp_parse_fastack函数里发现如果不定义IKCP_FASTACK_CONSERVE宏,会导致已经重传的报文的报文被反复触发快重传,比如:发送端A报文已经重传了,之后发送端收到大于A报文编号的几个报文的ack,那么这些ack又会导致快重传A报文。
所以应该添加这个宏,使用sn序号和ts时间戳共同决定报文是否需要快重传。