use constant from rethinkdb lib for default port

This commit is contained in:
Noah Levitt
2019-03-21 15:34:42 -07:00
parent fd0e86cd64
commit c596f49c8a
@@ -25,6 +25,7 @@ import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import com.rethinkdb.RethinkDB;
import com.rethinkdb.RethinkDBConstants;
import com.rethinkdb.gen.ast.ReqlExpr;
import com.rethinkdb.net.Connection;
@@ -182,7 +183,7 @@ public class TroughClient {
try {
String[] hostPort = rethinkServers[whichServer].split(":", 2);
String host = hostPort[0];
int port = 28015;
int port = RethinkDBConstants.DEFAULT_PORT;
if (hostPort.length == 2) {
port = Integer.valueOf(hostPort[1]);
}