Skip to content

Commit 0336218

Browse files
committed
check host of OpenSergoClient
Signed-off-by: Jiangnan Jia <jnan0806@gmail.com>
1 parent bd5f15f commit 0336218

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/io/opensergo/OpenSergoClient.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class OpenSergoClient implements AutoCloseable {
5353
public static class Builder {
5454

5555
private String host;
56-
private int port;
56+
private int port = 10246;
5757
private OpenSergoClientConfig openSergoConfig;
5858

5959
public OpenSergoClient.Builder endpoint(String host, int port) {
@@ -83,6 +83,7 @@ public OpenSergoClient(String host, int port) {
8383
}
8484

8585
public OpenSergoClient(String host, int port, OpenSergoClientConfig clientConfig) {
86+
AssertUtils.notEmpty(host, "host cannot be empty, maybe need to invoke endpoint(host, port)");
8687
checkClientConfig(clientConfig);
8788
// TODO: support TLS
8889
this.clientConfig = clientConfig;

0 commit comments

Comments
 (0)