protect nil pointer

This commit is contained in:
Fran Bull committed 2025-02-24 10:29:05 -08:00
1 parent 05277e020e
commit 3ed0736ae9
1 file changed
+3
+3
View File
@@ -129,6 +129,9 @@ func (sl StreamLayer) Accept() (net.Conn, error) {
return nil, err
}
if conn == nil || conn.RemoteAddr() == nil {
continue
}
addr, err := addrFromServerAddress(conn.RemoteAddr().String())
if err != nil {
// TODO should we stay alive here?