opensergo / opensergo-java-sdk

OpenSergo Java SDK
Apache License 2.0
41 stars 24 forks source link

Fix the bug that no error occurred when client is unavailable #21

Closed sczyh30 closed 1 year ago

sczyh30 commented 1 year ago

Signed-off-by: Eric Zhao sczyh16@gmail.com

Describe what this PR does / why we need it

Fix the bug that no error occurred when gRPC connection is unavailable.

Does this pull request fix one issue?

Fixes #20

Describe how you did it

Add a default deadline (timeout) for the gRPC stub. Then error will occur when the deadline exceeds.

Describe how to verify it

Run the demo with a bad remote endpoint.

Special notes for reviews

We may need to make the timeout configurable later.