fix infinite recursive call

This commit is contained in:
Kuma Kuma 2023-10-13 20:59:57 +08:00 committed by GitHub
parent 36bb5bd205
commit bd52013e31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ func NewPacketConnCounter(conn network.PacketConn, l *ratelimit.Bucket) network.
func (p *PacketConnCounter) ReadPacket(buff *buf.Buffer) (destination M.Socksaddr, err error) {
pLen := buff.Len()
destination, err = p.ReadPacket(buff)
destination, err = p.PacketConn.ReadPacket(buff)
p.limiter.Wait(int64(buff.Len() - pLen))
return
}