Skip to content

Commit

Permalink
Merge pull request maidsafe#2069 from b-zee/fix-build-without-upnp
Browse files Browse the repository at this point in the history
fix(networking): build with --no-default-features
  • Loading branch information
joshuef authored Aug 29, 2024
2 parents e15aae3 + 783a853 commit af08748
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sn_networking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repository = "https://github.com/maidsafe/safe_network"
version = "0.17.2"

[features]
default = ["libp2p/quic"]
default = []
local-discovery = ["libp2p/mdns"]
upnp = ["libp2p/upnp"]
# tcp is automatically enabled when compiling for wasm32
Expand All @@ -30,7 +30,7 @@ libp2p = { version = "0.53", features = [
"request-response",
"cbor",
"identify",
"tcp",
"quic",
"relay",
"noise",
"tcp",
Expand Down
3 changes: 1 addition & 2 deletions sn_networking/src/event/swarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
// KIND, either express or implied. Please review the Licences for the specific language governing
// permissions and limitations relating to use of the SAFE Network Software.

use crate::event::TerminateNodeReason;
use crate::{
cmd::LocalSwarmCmd,
event::NodeEvent,
Expand Down Expand Up @@ -82,7 +81,7 @@ impl SwarmDriver {
if let libp2p::upnp::Event::GatewayNotFound = upnp_event {
warn!("UPnP is not enabled/supported on the gateway. Please rerun without the `--upnp` flag");
self.send_event(NetworkEvent::TerminateNode {
reason: TerminateNodeReason::UpnpGatewayNotFound,
reason: crate::event::TerminateNodeReason::UpnpGatewayNotFound,
});
}
}
Expand Down

0 comments on commit af08748

Please sign in to comment.