Skip to content

Commit

Permalink
运维部署,解决每次连接不同服务器都默认访问第一台服务器的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zhy6599 committed May 8, 2020
1 parent 651253f commit 8def7ea
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,8 @@
*/
public class ScpClientUtil {

static private ScpClientUtil instance;

static synchronized public ScpClientUtil getInstance(String ip, int port, String username, String password) {
if (instance == null) {
instance = new ScpClientUtil(ip, port, username, password);
}
return instance;
return new ScpClientUtil(ip, port, username, password);
}

public ScpClientUtil(String ip, int port, String username, String password) {
Expand Down

0 comments on commit 8def7ea

Please sign in to comment.