提交 64046b5d authored 作者: Thomas Mueller's avatar Thomas Mueller

Start TCP server first

上级 44e8cade
...@@ -304,6 +304,17 @@ public class Server extends Tool implements Runnable, ShutdownHandler { ...@@ -304,6 +304,17 @@ public class Server extends Tool implements Runnable, ShutdownHandler {
shutdownTcpServer(tcpShutdownServer, tcpPassword, tcpShutdownForce, false); shutdownTcpServer(tcpShutdownServer, tcpPassword, tcpShutdownForce, false);
} }
try { try {
if (tcpStart) {
tcp = createTcpServer(args);
tcp.start();
out.println(tcp.getStatus());
tcp.setShutdownHandler(this);
}
if (pgStart) {
pg = createPgServer(args);
pg.start();
out.println(pg.getStatus());
}
if (webStart) { if (webStart) {
web = createWebServer(args); web = createWebServer(args);
web.setShutdownHandler(this); web.setShutdownHandler(this);
...@@ -330,17 +341,6 @@ public class Server extends Tool implements Runnable, ShutdownHandler { ...@@ -330,17 +341,6 @@ public class Server extends Tool implements Runnable, ShutdownHandler {
} else if (browserStart) { } else if (browserStart) {
out.println("The browser can only start if a web server is started (-web)"); out.println("The browser can only start if a web server is started (-web)");
} }
if (tcpStart) {
tcp = createTcpServer(args);
tcp.start();
out.println(tcp.getStatus());
tcp.setShutdownHandler(this);
}
if (pgStart) {
pg = createPgServer(args);
pg.start();
out.println(pg.getStatus());
}
} catch (SQLException e) { } catch (SQLException e) {
stopAll(); stopAll();
throw e; throw e;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论