Here's the error (I printed length to make sure it's that):
resp_buf length before calling drain: 110
resp_buf length before calling drain: 16
thread 'main' panicked at 'range end index 20 out of range for slice of length 16', /rustc/993deaa0bf8bab9dd3eadfd1fbeb093328e95afe/library/alloc/src/vec/mod.rs:1993:36
Error is caused by calling
drain
method onresp_buf
indiscovery::tracker::udp::udp_announce
when the vector's length is smaller than 20: https://github.com/ZeroNetX/zeronet-rs/blob/8ca5e5b72b6eee03faec04fca8fa8ce79950c28d/src/discovery/tracker/udp.rs#L127Here's the error (I printed length to make sure it's that):