From 9b9edf08d82ce46367806d5d019e3191585302a9 Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 14 Jan 2020 14:11:31 +0000 Subject: [PATCH] fix conn accept deadlock --- pkg/listener/listener.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/listener/listener.go b/pkg/listener/listener.go index 7eb93b7..bc7534e 100644 --- a/pkg/listener/listener.go +++ b/pkg/listener/listener.go @@ -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: } } }