mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
fix(trojan): potential memory leaking (#297)
This commit is contained in:
1 file changed
+1
@@ -84,6 +84,7 @@ func (s *Trojan) Serve(c net.Conn) {
|
||||
|
||||
if s.withTLS {
|
||||
tlsConn := tls.Server(c, s.tlsConfig)
|
||||
defer tlsConn.Close()
|
||||
err := tlsConn.Handshake()
|
||||
if err != nil {
|
||||
log.F("[trojan] error in tls handshake: %s", err)
|
||||
|
||||
Reference in new issue
Block a user