升级到 0.25.1

This commit is contained in:
haidy 2019-03-24 08:33:36 +08:00
parent d51527959b
commit 1eb4a917fe
2 changed files with 4 additions and 5 deletions

View File

@ -16,7 +16,6 @@ package client
import ( import (
"crypto/tls" "crypto/tls"
"fmt"
"io" "io"
"runtime/debug" "runtime/debug"
"sync" "sync"
@ -182,7 +181,7 @@ func (ctl *Control) connectServer() (conn frpNet.Conn, err error) {
InsecureSkipVerify: true, InsecureSkipVerify: true,
} }
} }
conn, err = frpNet.ConnectServerByProxy(g.GlbClientCfg.HttpProxy, g.GlbClientCfg.Protocol, conn, err = frpNet.ConnectServerByProxyWithTLS(g.GlbClientCfg.HttpProxy, g.GlbClientCfg.Protocol,
newAddress(g.GlbClientCfg.ServerAddr, g.GlbClientCfg.ServerPort), tlsConfig) newAddress(g.GlbClientCfg.ServerAddr, g.GlbClientCfg.ServerPort), tlsConfig)
if err != nil { if err != nil {
ctl.Warn("start new connection to server error: %v", err) ctl.Warn("start new connection to server error: %v", err)

View File

@ -170,15 +170,15 @@ func (svr *Service) login() (conn frpNet.Conn, session *fmux.Session, err error)
InsecureSkipVerify: true, InsecureSkipVerify: true,
} }
} }
conn, err = frpNet.ConnectServerByProxy(g.GlbClientCfg.HttpProxy, g.GlbClientCfg.Protocol, conn, err = frpNet.ConnectServerByProxyWithTLS(g.GlbClientCfg.HttpProxy, g.GlbClientCfg.Protocol,
newAddress(g.GlbClientCfg.ServerAddr, g.GlbClientCfg.ServerPort), tlsConfig) newAddress(g.GlbClientCfg.ServerAddr, g.GlbClientCfg.ServerPort), tlsConfig)
if err != nil { if err != nil {
return return
} }
defer func() { defer func() {
if err != nil { if err != nil && conn != nil {
conn.Close() _ = conn.Close()
} }
}() }()