1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-03 07:56:42 -05:00

fix a nil reference issue in tls listener

This commit is contained in:
Darien Raymond 2017-02-17 10:33:42 +01:00
parent 7d2e2baaf9
commit 949a74edfa
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -107,12 +107,13 @@ func (v *TCPListener) KeepAccepting() {
v.Unlock() v.Unlock()
break break
} }
if v.tlsConfig != nil { if conn != nil && v.tlsConfig != nil {
conn = tls.Server(conn, v.tlsConfig) conn = tls.Server(conn, v.tlsConfig)
} }
if v.authConfig != nil { if conn != nil && v.authConfig != nil {
conn = v.authConfig.Server(conn) conn = v.authConfig.Server(conn)
} }
select { select {
case v.awaitingConns <- &ConnectionWithError{ case v.awaitingConns <- &ConnectionWithError{
conn: conn, conn: conn,