Skip to content

Commit

Permalink
Fixes with Parsing GRPC Endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
amigin committed Nov 4, 2024
1 parent 7c47db1 commit 88ae93f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions my-grpc-extensions/src/grpc_channel/grpc_channel_holder.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::time::Duration;

use my_logger::LogEventCtx;
use rust_extensions::url_utils::HostEndpoint;
use rust_extensions::remote_endpoint::RemoteEndpoint;
use tokio::sync::Mutex;
use tonic::transport::Channel;

Expand Down Expand Up @@ -143,9 +143,9 @@ impl GrpcChannelHolder {
request_timeout: Duration,
#[cfg(feature = "with-ssh")] ssh_target: crate::ssh::SshTargetInner,
) -> Result<Channel, GrpcReadError> {
let grpc_service_endpoint = HostEndpoint::new(&connect_url);
let grpc_service_endpoint = RemoteEndpoint::try_parse(&connect_url);

if grpc_service_endpoint.is_none() {
if grpc_service_endpoint.is_err() {
panic!(
"Failed to parse grpc service endpoint: {} for service {}",
connect_url, service_name
Expand Down

0 comments on commit 88ae93f

Please sign in to comment.