Closed qzhsjz closed 1 year ago
panic: invalid argument to Int63n
goroutine 3806 [running]: math/rand.(Rand).Int63n(0x140005d0140?, 0x14001058890?) /opt/homebrew/opt/go/libexec/src/math/rand/rand.go:121 +0xe8 math/rand.Int63n(...) /opt/homebrew/opt/go/libexec/src/math/rand/rand.go:348 github.com/anacrolix/dms/ssdp.(Server).handle(0x140005d0140, {0x140012dd200, 0x65, 0x5dc}, 0x140005381b0?) /Users/*/go/pkg/mod/github.com/anacrolix/dms@v1.6.0/ssdp/ssdp.go:319 +0x874 created by github.com/anacrolix/dms/ssdp.(Server).serve /Users//go/pkg/mod/github.com/anacrolix/dms@v1.6.0/ssdp/ssdp.go:129 +0x2c
This is because some clients report the mx value 0.
Fixed by https://github.com/anacrolix/dms/pull/124, thank you very much for the contribution.
panic: invalid argument to Int63n
goroutine 3806 [running]: math/rand.(Rand).Int63n(0x140005d0140?, 0x14001058890?) /opt/homebrew/opt/go/libexec/src/math/rand/rand.go:121 +0xe8 math/rand.Int63n(...) /opt/homebrew/opt/go/libexec/src/math/rand/rand.go:348 github.com/anacrolix/dms/ssdp.(Server).handle(0x140005d0140, {0x140012dd200, 0x65, 0x5dc}, 0x140005381b0?) /Users/*/go/pkg/mod/github.com/anacrolix/dms@v1.6.0/ssdp/ssdp.go:319 +0x874 created by github.com/anacrolix/dms/ssdp.(Server).serve /Users//go/pkg/mod/github.com/anacrolix/dms@v1.6.0/ssdp/ssdp.go:129 +0x2c