mirror of
https://github.com/netbirdio/netbird.git
synced 2024-12-15 19:31:06 +01:00
22 lines
300 B
Go
22 lines
300 B
Go
package peer
|
|
|
|
import (
|
|
"net"
|
|
|
|
log "github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func remoteConnNil(log *log.Entry, conn net.Conn) bool {
|
|
if conn == nil {
|
|
log.Errorf("ice conn is nil")
|
|
return true
|
|
}
|
|
|
|
if conn.RemoteAddr() == nil {
|
|
log.Errorf("ICE remote address is nil")
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|