[Pkg-privacy-commits] [obfs4proxy] 08/14: fix incorrect connection close
Ximin Luo
infinity0 at debian.org
Sat Feb 20 22:34:35 UTC 2016
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository obfs4proxy.
commit c0e8866c13f051c4eea0c1d940b8592cd7c8075c
Author: pminmax945 <pminmax945 at gmail.com>
Date: Sun Jan 17 12:23:20 2016 +0000
fix incorrect connection close
when obfs4 connection create failed,conn variable is
set to nil already.
---
transports/obfs4/obfs4.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/obfs4proxy.git
More information about the Pkg-privacy-commits
mailing list