schollz / peerdiscovery

Pure-Go library for cross-platform local peer discovery using UDP multicast :woman: :repeat: :woman:
MIT License
638 stars 55 forks source link

Index out of range error in some rare cases #15

Closed shvydky closed 4 years ago

shvydky commented 4 years ago

Sometimes panic occurs while discovery in progress:

panic: runtime error: index out of range [6] with length 6

goroutine 19 [running]:
github.com/schollz/peerdiscovery.Discover(0xc0002e5e50, 0x1, 0x1, 0xc00048a000, 0x6, 0x6, 0x0, 0x0)
    c:/projects/go/src/github.com/schollz/peerdiscovery/peerdiscovery.go:228 +0x1194
shvydky commented 4 years ago

fixed in v1.5.2