Skip to content

Commit

Permalink
remove unused param
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed Jan 5, 2024
1 parent 631cae2 commit 16b0610
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fec.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ type (
}
)

func newFECEncoder(dataShards, parityShards, offset, minRTO int) *fecEncoder {
func newFECEncoder(dataShards, parityShards, offset int) *fecEncoder {
if dataShards <= 0 || parityShards <= 0 {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion fec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func BenchmarkFECEncode(b *testing.B) {

b.ReportAllocs()
b.SetBytes(payLoad)
encoder := newFECEncoder(dataSize, paritySize, 0, 200)
encoder := newFECEncoder(dataSize, paritySize, 0)
for i := 0; i < b.N; i++ {
data := make([]byte, payLoad)
encoder.encode(data, 200)
Expand Down
4 changes: 2 additions & 2 deletions sess.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ func newUDPSession(conv uint32, dataShards, parityShards int, l *Listener, conn
// FEC codec initialization
sess.fecDecoder = newFECDecoder(dataShards, parityShards)
if sess.block != nil {
sess.fecEncoder = newFECEncoder(dataShards, parityShards, cryptHeaderSize, IKCP_RTO_DEF)
sess.fecEncoder = newFECEncoder(dataShards, parityShards, cryptHeaderSize)
} else {
sess.fecEncoder = newFECEncoder(dataShards, parityShards, 0, IKCP_RTO_DEF)
sess.fecEncoder = newFECEncoder(dataShards, parityShards, 0)
}

// calculate additional header size introduced by FEC and encryption
Expand Down

0 comments on commit 16b0610

Please sign in to comment.