From 7196ed809a27839ddf6b50dcad2b87cff95162dd Mon Sep 17 00:00:00 2001 From: xieyongda Date: Wed, 19 Jun 2024 12:19:27 +0800 Subject: [PATCH] fix out of range --- client/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/main.go b/client/main.go index b08345c98..8d7f86446 100644 --- a/client/main.go +++ b/client/main.go @@ -462,10 +462,10 @@ func main() { go scavenger(chScavenger, &config) // start listener - numconn := uint16(config.Conn) + rlen := (uint16)(len(config.RemoteAddr)) + numconn := uint16(config.Conn * int(rlen)) muxes := make([]timedSession, numconn) rr := uint16(0) - rlen := (uint16)(len(config.RemoteAddr)) for { p1, err := listener.Accept() if err != nil {