We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8da3d73 commit 5cc7c6fCopy full SHA for 5cc7c6f
src/lib.rs
@@ -481,9 +481,23 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
481
482
let bind_addr = listening_address
483
.to_socket_addrs()
484
- .expect("Unable to resolve listing address")
+ .map_err(|_| {
485
+ log_error!(
486
+ self.logger,
487
+ "Unable to resolve listing address: {:?}",
488
+ listening_address
489
+ );
490
+ Error::InvalidNetAddress
491
+ })?
492
.next()
- .expect("Unable to resolve listing address");
493
+ .ok_or_else(|| {
494
495
496
497
498
499
500
+ })?;
501
502
runtime.spawn(async move {
503
let listener =
0 commit comments