Handle Grafana server bind errors gracefuly. (#4241)

* Fix error handling for grafana sever start.

* Update client/grafana-data-source/src/server.rs

Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
Tomasz Drwięga
2019-11-28 12:16:54 +01:00
committed by Gavin Wood
parent 2f35d7f003
commit f78b83e363
4 changed files with 49 additions and 8 deletions
+1 -1
View File
@@ -524,7 +524,7 @@ fn start_rpc_servers<C, G, E, H: FnMut() -> rpc_servers::RpcHandler<rpc::Metadat
.or_else(|e| match e.kind() {
io::ErrorKind::AddrInUse |
io::ErrorKind::PermissionDenied => {
warn!("Unable to bind server to {}. Trying random port.", address);
warn!("Unable to bind RPC server to {}. Trying random port.", address);
address.set_port(0);
start(&address)
},