Merge pull request #21 from kumakuma10/patch-1

fix infinite recursive call
This commit is contained in:
Yuzuki 2023-10-13 21:15:24 +08:00 committed by GitHub
commit 35ae3bdd1b
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
}