mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
fix(trojan): potential memory leaking (#297)
This commit is contained in:
parent
ce85f15c4b
commit
ca320d3c7f
@ -84,6 +84,7 @@ func (s *Trojan) Serve(c net.Conn) {
|
|||||||
|
|
||||||
if s.withTLS {
|
if s.withTLS {
|
||||||
tlsConn := tls.Server(c, s.tlsConfig)
|
tlsConn := tls.Server(c, s.tlsConfig)
|
||||||
|
defer tlsConn.Close()
|
||||||
err := tlsConn.Handshake()
|
err := tlsConn.Handshake()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.F("[trojan] error in tls handshake: %s", err)
|
log.F("[trojan] error in tls handshake: %s", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user