Skip to content

Commit

Permalink
fix: use relay only for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Septias committed May 20, 2024
1 parent 338cd45 commit 1dcc6f6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/peer_channels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,12 @@ impl Context {
{
RelayMode::Custom(RelayMap::from_url(RelayUrl::from(relay_url)))
} else {
// FIXME: this should be RelayMode::Disabled instead.
// Currently using default relays because otherwise Rust tests fail.
RelayMode::Default
#[cfg(test)]
{
RelayMode::Default
}
#[cfg(not(test))]
RelayMode::Disabled
};

let endpoint = MagicEndpoint::builder()
Expand Down

0 comments on commit 1dcc6f6

Please sign in to comment.