1
0
mirror of https://github.com/fumiama/WireGold.git synced 2026-06-05 07:50:24 +08:00

optimize: enlarge dup pkt gap time

This commit is contained in:
源文雨
2024-07-31 15:45:37 +08:00
parent dd51f9f26f
commit aaafcdfa6c

View File

@@ -96,7 +96,7 @@ func (l *Link) write(p *head.Packet, teatype uint8, additional uint16, datasz ui
}
if l.doublepacket {
cpp := p.Copy()
time.AfterFunc(time.Millisecond*(10+time.Duration(rand.Intn(10))), func() {
_ = time.AfterFunc(time.Millisecond*(100+time.Duration(rand.Intn(50))), func() {
defer cpp.Put()
_, _ = l.writeonce(cpp, teatype, additional, datasz, offset, istransfer, hasmore)
})