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 a514bbf commit 10cc6e8Copy full SHA for 10cc6e8
src/lib.rs
@@ -483,9 +483,23 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
483
484
let bind_addr = listening_address
485
.to_socket_addrs()
486
- .expect("Unable to resolve listing address")
+ .map_err(|_| {
487
+ log_error!(
488
+ self.logger,
489
+ "Unable to resolve listing address: {:?}",
490
+ listening_address
491
+ );
492
+ Error::InvalidNetAddress
493
+ })?
494
.next()
- .expect("Unable to resolve listing address");
495
+ .ok_or_else(|| {
496
497
498
499
500
501
502
+ })?;
503
504
runtime.spawn(async move {
505
let listener =
0 commit comments