Remove env var for debug purpose

This commit is contained in:
Zoltán Papp 2024-07-18 10:41:14 +02:00
parent e75fbd34a7
commit 233a7b9802
3 changed files with 0 additions and 20 deletions

View File

@ -316,11 +316,6 @@ func (c *ConnectClient) run(
}
func parseRelayInfo(resp *mgmProto.LoginResponse) (string, *hmac.Token) {
// todo remove this
if ra := peer.ForcedRelayAddress(); ra != "" {
return ra, nil
}
msg := resp.GetWiretrusteeConfig().GetRelay()
if msg == nil {
return "", nil

View File

@ -16,13 +16,6 @@ const (
envICEForceRelayConn = "NB_ICE_FORCE_RELAY_CONN"
)
func ForcedRelayAddress() string {
if envRelay := os.Getenv("NB_RELAY_ADDRESS"); envRelay != "" {
return envRelay
}
return ""
}
func iceKeepAlive() time.Duration {
keepAliveEnv := os.Getenv(envICEKeepAliveIntervalSec)
if keepAliveEnv == "" {

View File

@ -103,10 +103,6 @@ func (h *Handshaker) SendOffer() error {
// OnRemoteOffer handles an offer from the remote peer and returns true if the message was accepted, false otherwise
// doesn't block, discards the message if connection wasn't ready
func (h *Handshaker) OnRemoteOffer(offer OfferAnswer) bool {
// todo remove this if signaling can support relay
if ForcedRelayAddress() != "" {
offer.RelaySrvAddress = ForcedRelayAddress()
}
select {
case h.remoteOffersCh <- offer:
return true
@ -120,10 +116,6 @@ func (h *Handshaker) OnRemoteOffer(offer OfferAnswer) bool {
// OnRemoteAnswer handles an offer from the remote peer and returns true if the message was accepted, false otherwise
// doesn't block, discards the message if connection wasn't ready
func (h *Handshaker) OnRemoteAnswer(answer OfferAnswer) bool {
// todo remove this if signaling can support relay
if ForcedRelayAddress() != "" {
answer.RelaySrvAddress = ForcedRelayAddress()
}
select {
case h.remoteAnswerCh <- answer:
return true