mirror of
https://github.com/sot-tech/mochi.git
synced 2026-05-19 22:34:47 -07:00
(tested) fix redis to pass tests
* delete info hash count key from redis (replaced with SCARD on infohash set) * add GC test * add peer.Addr() functio to always return unwrapped address if 4to6 appear
This commit is contained in:
@@ -27,7 +27,7 @@ func SanitizeAnnounce(r *AnnounceRequest, maxNumWant, defaultNumWant uint32) err
|
||||
r.NumWant = maxNumWant
|
||||
}
|
||||
|
||||
r.AddrPort = netip.AddrPortFrom(r.Addr().Unmap(), r.Port())
|
||||
r.AddrPort = netip.AddrPortFrom(r.Addr(), r.Port())
|
||||
if !r.Addr().IsValid() || r.Addr().IsUnspecified() {
|
||||
return ErrInvalidIP
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user