File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
sdk/src/main/java/io/dapr/client Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -170,16 +170,20 @@ private DaprClient buildDaprClientGrpc() {
170
170
}
171
171
172
172
private ManagedChannel buildGrpcManagedChanel () {
173
- String host = Properties .SIDECAR_IP .get ();
173
+ String address = Properties .SIDECAR_IP .get ();
174
174
int port = Properties .GRPC_PORT .get ();
175
175
boolean insecure = true ;
176
176
String grpcEndpoint = Properties .GRPC_ENDPOINT .get ();
177
177
if ((grpcEndpoint != null ) && !grpcEndpoint .isEmpty ()) {
178
178
URI uri = URI .create (grpcEndpoint );
179
179
insecure = uri .getScheme ().equalsIgnoreCase ("http" );
180
180
port = uri .getPort () > 0 ? uri .getPort () : (insecure ? 80 : 443 );
181
+ address = uri .getHost ();
182
+ if ((uri .getPath () != null ) && !uri .getPath ().isEmpty ()) {
183
+ address += uri .getPath ();
184
+ }
181
185
}
182
- ManagedChannelBuilder builder = ManagedChannelBuilder .forAddress (host , port )
186
+ ManagedChannelBuilder builder = ManagedChannelBuilder .forAddress (address , port )
183
187
.userAgent (Version .getSdkVersion ());
184
188
if (insecure ) {
185
189
builder = builder .usePlaintext ();
You can’t perform that action at this time.
0 commit comments