Skip to content

Commit

Permalink
chore(node): [#1999] panic on upnp event GatewayNotFound
Browse files Browse the repository at this point in the history
  • Loading branch information
mickvandijke committed Jul 24, 2024
1 parent b2d7307 commit e6b0d10
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sn_networking/src/event/swarm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ use itertools::Itertools;
use libp2p::mdns;
#[cfg(feature = "open-metrics")]
use libp2p::metrics::Recorder;
use libp2p::upnp::Event;
use libp2p::{
kad::K_VALUE,
multiaddr::Protocol,
Expand Down Expand Up @@ -80,6 +81,9 @@ impl SwarmDriver {
}
event_string = "upnp_event";
info!(?upnp_event, "UPnP event");
if let Event::GatewayNotFound = upnp_event {
panic!("UPnP is not enabled/supported on your gateway. Please rerun without the `--upnp` flag");
}
}

SwarmEvent::Behaviour(NodeEvent::RelayServer(event)) => {
Expand Down

0 comments on commit e6b0d10

Please sign in to comment.