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

validator: Improve address in use error message for RPC pubsub #9464

Merged
merged 1 commit into from
Apr 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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