Skip to content

Commit 22f27a2

Browse files
committed
Use BoxCloneSyncService instead of BoxCloneService for CustomChannel
To keep Client Sync. See #109
1 parent fbb11f7 commit 22f27a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/channel.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{future::Future, pin::Pin, task::ready};
33
use http::Uri;
44
use tokio::sync::mpsc::Sender;
55
use tonic::transport::{channel::Change, Endpoint};
6-
use tower::{util::BoxCloneService, Service};
6+
use tower::{util::BoxCloneSyncService, Service};
77

88
/// A type alias to make the below types easier to represent.
99
pub type EndpointUpdater = Sender<Change<Uri, Endpoint>>;
@@ -54,7 +54,7 @@ impl BalancedChannelBuilder for Openssl {
5454

5555
type TonicRequest = http::Request<tonic::body::Body>;
5656
type TonicResponse = http::Response<tonic::body::Body>;
57-
pub type CustomChannel = BoxCloneService<TonicRequest, TonicResponse, tower::BoxError>;
57+
pub type CustomChannel = BoxCloneSyncService<TonicRequest, TonicResponse, tower::BoxError>;
5858

5959
/// Represents a channel that can be created by a BalancedChannelBuilder
6060
/// or may be initialized externally and passed into the client.

0 commit comments

Comments
 (0)