mirror of
https://github.com/fumiama/WireGold.git
synced 2026-06-12 12:50:28 +08:00
optimize: enlarge dup pkt gap time
This commit is contained in:
@@ -96,7 +96,7 @@ func (l *Link) write(p *head.Packet, teatype uint8, additional uint16, datasz ui
|
|||||||
}
|
}
|
||||||
if l.doublepacket {
|
if l.doublepacket {
|
||||||
cpp := p.Copy()
|
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()
|
defer cpp.Put()
|
||||||
_, _ = l.writeonce(cpp, teatype, additional, datasz, offset, istransfer, hasmore)
|
_, _ = l.writeonce(cpp, teatype, additional, datasz, offset, istransfer, hasmore)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user