Skip to content

Commit

Permalink
combine if else
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Jul 2, 2020
1 parent 43d2c47 commit 61b6a3e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -656,9 +656,7 @@ func (kcp *KCP) Input(data []byte, regular, ackNoDelay bool) int {

if windowSlides { // if window has slided, flush
kcp.flush(false)
}

if ackNoDelay && len(kcp.acklist) > 0 { // ack immediately
} else if ackNoDelay && len(kcp.acklist) > 0 { // ack immediately
kcp.flush(true)
}
return 0
Expand Down

0 comments on commit 61b6a3e

Please sign in to comment.