diff options
Diffstat (limited to 'transports')
-rw-r--r-- | transports/obfs4/obfs4.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/transports/obfs4/obfs4.go b/transports/obfs4/obfs4.go index 5701535..40b1406 100644 --- a/transports/obfs4/obfs4.go +++ b/transports/obfs4/obfs4.go @@ -214,8 +214,9 @@ func (cf *obfs4ClientFactory) Dial(network, addr string, dialFn base.DialFunc, a if err != nil { return nil, err } + dialConn := conn if conn, err = newObfs4ClientConn(conn, ca); err != nil { - conn.Close() + dialConn.Close() return nil, err } return conn, nil |