From 74ad5d80fcce4f71d4b963854aab94f493e07c3c Mon Sep 17 00:00:00 2001 From: xieyongda Date: Wed, 19 Jun 2024 12:18:02 +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..026df8a97 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 * rlen) muxes := make([]timedSession, numconn) rr := uint16(0) - rlen := (uint16)(len(config.RemoteAddr)) for { p1, err := listener.Accept() if err != nil {