diff --git a/.gitignore b/.gitignore index 46a38783..2fdee56b 100644 --- a/.gitignore +++ b/.gitignore @@ -107,6 +107,6 @@ buildnumber *.directory cmd.bat cmd.sh +project/target ## PVS Studio .PVS-Studio/ -project/target diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/PostgreSQLSourceConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/PostgreSQLSourceConfig.java index 9de90848..f32e219c 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/auth/PostgreSQLSourceConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/auth/PostgreSQLSourceConfig.java @@ -21,8 +21,8 @@ public final class PostgreSQLSourceConfig implements AutoCloseable { private String poolName; // Config - private String address; - private int port; + private String[] addresses; + private int[] ports; private String username; private String password; private String database; @@ -43,8 +43,8 @@ public synchronized Connection getConnection() throws SQLException { PGSimpleDataSource postgresqlSource = new PGSimpleDataSource(); // Set credentials - postgresqlSource.setServerNames(new String[] {address}); //TODO support multinode PostgreSQL DB - postgresqlSource.setPortNumbers(new int[] {port}); + postgresqlSource.setServerNames(addresses); + postgresqlSource.setPortNumbers(ports); postgresqlSource.setUser(username); postgresqlSource.setPassword(password); postgresqlSource.setDatabaseName(database); diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyServerSocketHandler.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyServerSocketHandler.java index bb3c944d..530be65f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyServerSocketHandler.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/handlers/NettyServerSocketHandler.java @@ -10,6 +10,7 @@ import java.net.Socket; import java.util.Set; +// TODO refactor @SuppressWarnings("unused") public final class NettyServerSocketHandler implements Runnable, AutoCloseable { private SSLServerSocketFactory ssf; @@ -18,9 +19,6 @@ public final class NettyServerSocketHandler implements Runnable, AutoCloseable { public LauncherNettyServer nettyServer; - // API - private Set sockets; - private transient final LaunchServer server; public NettyServerSocketHandler(LaunchServer server) { @@ -29,7 +27,8 @@ public NettyServerSocketHandler(LaunchServer server) { @Override public void close() { - //TODO: Close Impl + nettyServer.close(); + nettyServer.service.channels.close(); } @Override diff --git a/build.gradle b/build.gradle index bf75dddc..31e5ffca 100644 --- a/build.gradle +++ b/build.gradle @@ -2,7 +2,7 @@ id 'com.github.johnrengelman.shadow' version '5.2.0' apply false id 'maven-publish' id 'signing' - id 'org.openjfx.javafxplugin' version '0.0.7' apply false + id 'org.openjfx.javafxplugin' version '0.0.8' apply false } group = 'pro.gravit.launcher' version = '5.1.3'