From 7692446fd8704c065e38d7868288fc6554cc099c Mon Sep 17 00:00:00 2001 From: "arraykeys@gmail.com" Date: Mon, 10 Sep 2018 13:40:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96TCPS=E5=86=85=E5=AD=98?= =?UTF-8?q?=E9=87=8A=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/lib/transport/encrypt/conn.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/lib/transport/encrypt/conn.go b/core/lib/transport/encrypt/conn.go index db35bd8..9080da2 100644 --- a/core/lib/transport/encrypt/conn.go +++ b/core/lib/transport/encrypt/conn.go @@ -38,3 +38,10 @@ func (s *Conn) Read(b []byte) (n int, err error) { func (s *Conn) Write(b []byte) (n int, err error) { return s.w.Write(b) } +func (s *Conn) Close() (err error) { + err = s.Conn.Close() + s.Cipher = nil + s.r = nil + s.w = nil + return err +}