Skip to content

Commit

Permalink
check endpoint of OpenSergoClient
Browse files Browse the repository at this point in the history
Signed-off-by: Jiangnan Jia <[email protected]>
  • Loading branch information
jnan806 committed Feb 15, 2023
1 parent bd5f15f commit 2ea0ba3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/io/opensergo/OpenSergoClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class OpenSergoClient implements AutoCloseable {
public static class Builder {

private String host;
private int port;
private int port = 10246;
private OpenSergoClientConfig openSergoConfig;

public OpenSergoClient.Builder endpoint(String host, int port) {
Expand Down Expand Up @@ -83,6 +83,8 @@ public OpenSergoClient(String host, int port) {
}

public OpenSergoClient(String host, int port, OpenSergoClientConfig clientConfig) {
AssertUtils.notEmpty(host, "host cannot be empty, need to give a valid host");
AssertUtils.isTrue(port < 1, "port < 1 is invalid, need to give a valid port");
checkClientConfig(clientConfig);
// TODO: support TLS
this.clientConfig = clientConfig;
Expand Down

0 comments on commit 2ea0ba3

Please sign in to comment.