From 4da67951864128358459681399dd208c49d5d001 Mon Sep 17 00:00:00 2001
From: Rod Hynes <rod-hynes@users.noreply.github.com>
Date: Mon, 12 Aug 2019 17:06:06 -0400
Subject: [PATCH] Fix all-zeroes SessionID (#31)

---
 u_conn.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/u_conn.go b/u_conn.go
index 9079460..2706373 100644
--- a/u_conn.go
+++ b/u_conn.go
@@ -121,7 +121,7 @@ func (uconn *UConn) SetSessionState(session *ClientSessionState) error {
 				}
 			}
 			var sessionID [32]byte
-			_, err := io.ReadFull(uconn.config.rand(), uconn.HandshakeState.Hello.SessionId)
+			_, err := io.ReadFull(uconn.config.rand(), sessionID[:])
 			if err != nil {
 				return err
 			}
-- 
2.22.0

