diff --git a/client/internal/peer/conn.go b/client/internal/peer/conn.go index f93d4e8a6..e8dcb069b 100644 --- a/client/internal/peer/conn.go +++ b/client/internal/peer/conn.go @@ -4,6 +4,7 @@ import ( "context" "math/rand" "net" + "os" "runtime" "strings" "sync" @@ -155,7 +156,9 @@ func NewConn(engineCtx context.Context, config ConnConfig, statusRecorder *Statu } conn.handshaker.AddOnNewOfferListener(conn.workerRelay.OnNewOffer) - conn.handshaker.AddOnNewOfferListener(conn.workerICE.OnNewOffer) + if os.Getenv("NB_FORCE_RELAY") != "true" { + conn.handshaker.AddOnNewOfferListener(conn.workerICE.OnNewOffer) + } go conn.handshaker.Listen()