This commit is contained in:
esrrhs 2019-10-26 21:26:19 +08:00
parent bf39ee41b2
commit 284dcccd18
2 changed files with 5 additions and 1 deletions

View File

@ -231,7 +231,7 @@ func (fm *FrameMgr) addToRecvWin(rf *Frame) bool {
if !fm.isIdInRange((int)(rf.Id), FRAME_MAX_ID) { if !fm.isIdInRange((int)(rf.Id), FRAME_MAX_ID) {
loggo.Debug("recv frame not in range %d %d", rf.Id, fm.recvid) loggo.Debug("recv frame not in range %d %d", rf.Id, fm.recvid)
if !fm.isIdOld((int)(rf.Id), FRAME_MAX_ID) { if fm.isIdOld((int)(rf.Id), FRAME_MAX_ID) {
return true return true
} }
return false return false

View File

@ -91,4 +91,8 @@ func Test0001(t *testing.T) {
fm.recvid = 3 fm.recvid = 3
fm.windowsize = 5 fm.windowsize = 5
fmt.Println("fm.isIdOld = ", fm.isIdOld(1, 10)) fmt.Println("fm.isIdOld = ", fm.isIdOld(1, 10))
fm.recvid = 13
fm.windowsize = 10000
fmt.Println("fm.isIdOld = ", fm.isIdOld(9, FRAME_MAX_ID))
} }