Skip to content

Commit

Permalink
chore: 调整RaftConnectionFactory中创建链接的unwrap为?
Browse files Browse the repository at this point in the history
  • Loading branch information
heqingpan committed Nov 17, 2024
1 parent 4670e04 commit b89ba20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/raft/network/factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl RaftConnectionFactory {
Ok(channel)
} else {
let addr = format!("http://{}", &key);
let channel = Arc::new(Channel::from_shared(addr).unwrap().connect_lazy().unwrap());
let channel = Arc::new(Channel::from_shared(addr)?.connect_lazy()?);
self.channel_cache.set(key, channel.clone(), self.cache_ses);
Ok(channel)
}
Expand Down

0 comments on commit b89ba20

Please sign in to comment.