diff options
author | Yawning Angel <yawning@torproject.org> | 2016-01-25 12:16:15 +0000 |
---|---|---|
committer | Yawning Angel <yawning@torproject.org> | 2016-01-25 12:16:15 +0000 |
commit | 2cbefcfcd23d457cff742e4941cb705604d53ce5 (patch) | |
tree | d86f36e5cc709912ce37943d731be4b6f4669551 /transports/obfs3 | |
parent | c0e8866c13f051c4eea0c1d940b8592cd7c8075c (diff) |
Fix other instances of attempting to close `nil` on handshake failure.
Bug introduced in e52258edac55d82ff153755493d770bfbbc9a346, not in any
released version of obfs4proxy.
Diffstat (limited to 'transports/obfs3')
-rw-r--r-- | transports/obfs3/obfs3.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/transports/obfs3/obfs3.go b/transports/obfs3/obfs3.go index e4c3ba6..08d6be4 100644 --- a/transports/obfs3/obfs3.go +++ b/transports/obfs3/obfs3.go @@ -97,8 +97,9 @@ func (cf *obfs3ClientFactory) Dial(network, addr string, dialFn base.DialFunc, a if err != nil { return nil, err } + dialConn := conn if conn, err = newObfs3ClientConn(conn); err != nil { - conn.Close() + dialConn.Close() return nil, err } return conn, nil |