Improve RPC service startup error messages with actual error

Error always fixed to message about ports but that's not the only
error that can occur.
This commit is contained in:
Stephen Akridge 2018-11-29 10:51:07 -08:00 committed by sakridge
parent 978fd6858f
commit 8cc751d1cc
2 changed files with 4 additions and 4 deletions

View File

@ -59,8 +59,8 @@ impl JsonRpcService {
AccessControlAllowOrigin::Any,
]))
.start_http(&rpc_addr);
if server.is_err() {
warn!("JSON RPC service unavailable: unable to bind to RPC port {}. \nMake sure this port is not already in use by another application", rpc_addr.port());
if let Err(e) = server {
warn!("JSON RPC service unavailable error: {:?}. \nAlso, check that port {} is not already in use by another application", e, rpc_addr.port());
return;
}
while !exit_.load(Ordering::Relaxed) {

View File

@ -59,8 +59,8 @@ impl PubSubService {
})
.start(&pubsub_addr);
if server.is_err() {
warn!("Pubsub service unavailable: unable to bind to port {}. \nMake sure this port is not already in use by another application", pubsub_addr.port());
if let Err(e) = server {
warn!("Pubsub service unavailable error: {:?}. \nAlso, check that port {} is not already in use by another application", e, pubsub_addr.port());
return;
}
while !exit_.load(Ordering::Relaxed) {