fix:domain 为空
This commit is contained in:
@@ -222,6 +222,9 @@ public class OpcUtl {
|
||||
throws BadRequestException {
|
||||
checkTimeout();
|
||||
Server server = null;
|
||||
if (domain==null){
|
||||
domain="";
|
||||
}
|
||||
|
||||
try {
|
||||
server = new Server(getConnection(host, clsid, user, password, domain),
|
||||
@@ -233,19 +236,13 @@ public class OpcUtl {
|
||||
}
|
||||
}
|
||||
|
||||
public static Server getAutoServer(String host, String clsid, String user, String password, String domain) throws
|
||||
BadRequestException {
|
||||
checkTimeout();
|
||||
Server server = null;
|
||||
server = new Server(getConnection(host, clsid, user, password, domain), Executors.newSingleThreadScheduledExecutor());
|
||||
AutoReconnectController autoReconnectController = new AutoReconnectController(server);
|
||||
autoReconnectController.connect();
|
||||
return server;
|
||||
}
|
||||
|
||||
public static ConnectionInformation getConnection(String host, String clsid, String user, String password,
|
||||
String domain) {
|
||||
ConnectionInformation connection = new ConnectionInformation();
|
||||
if (domain==null){
|
||||
domain="";
|
||||
}
|
||||
connection.setHost(host);
|
||||
connection.setClsid(clsid);
|
||||
connection.setUser(user);
|
||||
|
||||
Reference in New Issue
Block a user