mirror of
https://github.com/fumiama/terasu.git
synced 2026-06-11 05:30:26 +08:00
fix: tls conn nil pointer
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
// Use terasu in this TLS conn
|
||||
func Use(conn *tls.Conn) *tls.Conn {
|
||||
trsConn := (*trsconn)(unsafe.Pointer(conn))
|
||||
trsConn.handshakeFn = trsConn.clientHandshake
|
||||
return (*tls.Conn)(unsafe.Pointer(trsConn))
|
||||
(*_trsconn)(unsafe.Pointer(conn)).handshakeFn = (*trsconn)(conn).clientHandshake
|
||||
return conn
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user