Skip to content

Commit

Permalink
feat(asb): Warn instead of bail, if we cannot listen on a particular …
Browse files Browse the repository at this point in the history
…network interface

The reason for this is to ensure the asb does not crash if the websocket listen address is still present in the config file. Support for it has been removed.
  • Loading branch information
binarybaron committed Nov 9, 2024
1 parent aa8c1a9 commit aec6bac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions swap/src/bin/asb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ pub async fn main() -> Result<()> {
)?;

for listen in config.network.listen.clone() {
Swarm::listen_on(&mut swarm, listen.clone())
.with_context(|| format!("Failed to listen on network interface {}", listen))?;
if let Err(e) = Swarm::listen_on(&mut swarm, listen.clone()) {
tracing::warn!("Failed to listen on network interface {}: {}. Consider removing it from the config.", listen, e);
}
}

tracing::info!(peer_id = %swarm.local_peer_id(), "Network layer initialized");
Expand Down

0 comments on commit aec6bac

Please sign in to comment.