diff --git a/simple-tcp-proxy.go b/simple-tcp-proxy.go index 33b235a..938c2ac 100644 --- a/simple-tcp-proxy.go +++ b/simple-tcp-proxy.go @@ -63,11 +63,11 @@ func serverTcpListen(tcpListen TcpListen) { continue } fmt.Printf("[INFO] TCP connection from %v, local: %v\n", conn.RemoteAddr(), conn.LocalAddr()) - go handleRequest(tcpListen, conn) + go handleTcpRequest(tcpListen, conn) } } -func handleRequest(tcpListen TcpListen, sconn net.Conn) { +func handleTcpRequest(tcpListen TcpListen, sconn net.Conn) { defer sconn.Close() ip := tcpListen.Backend dconn, err := net.Dial("tcp", ip)