Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Improve address in use error message for RPC pubsub
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Apr 13, 2020
1 parent 92a5a51 commit 37b048e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions validator/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1005,12 +1005,12 @@ pub fn main() {
let mut tcp_listeners = vec![];
if !private_rpc {
if let Some((rpc_port, rpc_pubsub_port)) = validator_config.rpc_ports {
for port in &[rpc_port, rpc_pubsub_port] {
for (purpose, port) in &[("RPC", rpc_port), ("RPC pubsub", rpc_pubsub_port)] {
tcp_listeners.push((
*port,
TcpListener::bind(&SocketAddr::from((rpc_bind_address, *port)))
.unwrap_or_else(|err| {
error!("Unable to bind to tcp/{}: {}", port, err);
error!("Unable to bind to tcp/{} for {}: {}", port, purpose, err);
std::process::exit(1);
}),
));
Expand Down

0 comments on commit 37b048e

Please sign in to comment.