fix conn accept deadlock
This commit is contained in:
parent
bbeb8ce7f4
commit
9b9edf08d8
@ -8,12 +8,12 @@ import (
|
||||
"log"
|
||||
"net"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"tcp-proxy/pkg/common"
|
||||
"tcp-proxy/pkg/config"
|
||||
"tcp-proxy/pkg/logger"
|
||||
"tcp-proxy/pkg/proxy"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
@ -146,6 +146,7 @@ func accept(ctx context.Context, listener *net.TCPListener, connChan chan *net.T
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return
|
||||
default:
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user