From 4d796486571221a3f456b0622d1f08c11aac8e79 Mon Sep 17 00:00:00 2001 From: gtt116 Date: Tue, 26 Dec 2017 14:39:07 +0800 Subject: [PATCH] Close connection if frpc can't connection to local server Now, when frpc can't connect to local server it leaves the connection alone, the patch fix it. Fixed #575 --- client/proxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/client/proxy.go b/client/proxy.go index 0b26bf41..12aaaeff 100644 --- a/client/proxy.go +++ b/client/proxy.go @@ -434,6 +434,7 @@ func HandleTcpWorkConnection(localInfo *config.LocalSvrConf, proxyPlugin plugin. localConn, err := frpNet.ConnectServer("tcp", fmt.Sprintf("%s:%d", localInfo.LocalIp, localInfo.LocalPort)) if err != nil { workConn.Error("connect to local service [%s:%d] error: %v", localInfo.LocalIp, localInfo.LocalPort, err) + remote.Close() return }