fix compatibility issues with go 1.21

This commit is contained in:
mmmray 2024-06-18 13:05:59 +02:00 committed by yuhan6665
parent 404af13b56
commit c1a7602412

View file

@ -263,7 +263,7 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
} else { } else {
var err error var err error
var uploadConn any var uploadConn any
for _ = range 5 { for i := 0; i < 5; i++ {
uploadConn = httpClient.uploadRawPool.Get() uploadConn = httpClient.uploadRawPool.Get()
if uploadConn == nil { if uploadConn == nil {
uploadConn, err = httpClient.dialUploadConn(ctx) uploadConn, err = httpClient.dialUploadConn(ctx)