fix conn accept deadlock

This commit is contained in:
Jay 2020-01-14 14:11:31 +00:00
parent bbeb8ce7f4
commit 9b9edf08d8
1 changed files with 3 additions and 2 deletions

View File

@ -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:
}
}
}