protect nil pointer

This commit is contained in:
Fran Bull 2025-02-24 10:29:05 -08:00
parent 05277e020e
commit 3ed0736ae9

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?