File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/main/java/io/opensergo Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 3030import io .opensergo .util .AssertUtils ;
3131import io .opensergo .util .IdentifierUtils ;
3232
33+ import java .util .concurrent .TimeUnit ;
3334import java .util .concurrent .atomic .AtomicInteger ;
3435
3536/**
@@ -48,8 +49,9 @@ public class OpenSergoClient implements AutoCloseable {
4849 private AtomicInteger reqId ;
4950
5051 public OpenSergoClient (String host , int port ) {
52+ // TODO: support customized config for the OpenSergoClient.
53+ // TODO: support TLS
5154 this .channel = ManagedChannelBuilder .forAddress (host , port )
52- // TODO: support TLS
5355 .usePlaintext ()
5456 .build ();
5557 this .transportGrpcStub = OpenSergoUniversalTransportServiceGrpc .newStub (channel );
@@ -59,8 +61,12 @@ public OpenSergoClient(String host, int port) {
5961 }
6062
6163 public void start () throws Exception {
62- this .requestAndResponseWriter = transportGrpcStub .withWaitForReady ()
64+ this .requestAndResponseWriter = transportGrpcStub
65+ .withWaitForReady ()
66+ // The deadline SHOULD be set when waitForReady is enabled
67+ .withDeadlineAfter (10 , TimeUnit .SECONDS )
6368 .subscribeConfig (new OpenSergoSubscribeClientObserver (configCache , subscribeRegistry ));
69+ // TODO: add state management for the client.
6470 }
6571
6672 @ Override
You can’t perform that action at this time.
0 commit comments